diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 913ab128eee1b6039e9a9ba8f0e548d968af8e5f..3e79572a5cb156fe27bd4b1deda26533fe1122b1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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); } } - 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: ret = 0; err: