diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-28 17:27:46 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-10-28 17:27:46 +0200 |
commit | a9af9835d31122b6354a44f99f74731f714233d2 (patch) | |
tree | 0ad69d0ab5d32985dd5f62309630282578662599 /fs | |
parent | Merge tag 'for-linus-4.14c-rc7-tag' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
parent | fuse: fix READDIRPLUS skipping an entry (diff) | |
download | linux-a9af9835d31122b6354a44f99f74731f714233d2.tar.xz linux-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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/dir.c | 3 |
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; |