summaryrefslogtreecommitdiffstats
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
parent11224e1fc40a6556dc285573ea93dd522f8c563f (diff)
parentc6cdd51404b7ac12dd95173ddfc548c59ecf037f (diff)
downloadlinux-a9af9835d31122b6354a44f99f74731f714233d2.tar.bz2
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;