aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-28 08:27:46 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-28 08:27:46 -0700
commita9af9835d31122b6354a44f99f74731f714233d2 (patch)
tree0ad69d0ab5d32985dd5f62309630282578662599
parentMerge tag 'for-linus-4.14c-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip (diff)
parentfuse: fix READDIRPLUS skipping an entry (diff)
downloadlinux-dev-a9af9835d31122b6354a44f99f74731f714233d2.tar.xz
linux-dev-a9af9835d31122b6354a44f99f74731f714233d2.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse
Pull fuse fix from Miklos Szeredi: "This fixes a longstanding bug, which can be triggered by interrupting a directory reading syscall" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix READDIRPLUS skipping an entry
-rw-r--r--fs/fuse/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 622081b97426..24967382a7b1 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1308,7 +1308,8 @@ static int parse_dirplusfile(char *buf, size_t nbytes, struct file *file,
*/
over = !dir_emit(ctx, dirent->name, dirent->namelen,
dirent->ino, dirent->type);
- ctx->pos = dirent->off;
+ if (!over)
+ ctx->pos = dirent->off;
}
buf += reclen;