提交 5e591a07 编写于 作者: Y Yan Zheng 提交者: Chris Mason

Btrfs: Fix looping on readdir of the subvol roots

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 0762704b
...@@ -1465,7 +1465,10 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -1465,7 +1465,10 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
di = (struct btrfs_dir_item *)((char *)di + di_len); di = (struct btrfs_dir_item *)((char *)di + di_len);
} }
} }
filp->f_pos = INT_LIMIT(typeof(filp->f_pos)); if (key_type == BTRFS_DIR_INDEX_KEY)
filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
else
filp->f_pos++;
nopos: nopos:
ret = 0; ret = 0;
err: err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册