summaryrefslogtreecommitdiffstats
path: root/fs/befs/linuxvfs.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-22 19:41:26 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-31 21:17:56 +0200
commit448293aadb54ab38b9c053bf9f1eecafdc0ed214 (patch)
treec7ef8d7de99d7048c8b29f932a970ffdd5c6c045 /fs/befs/linuxvfs.c
parenthpfs: deadlock and race in directory lseek() (diff)
downloadlinux-448293aadb54ab38b9c053bf9f1eecafdc0ed214.tar.xz
linux-448293aadb54ab38b9c053bf9f1eecafdc0ed214.zip
befs_readdir(): do not increment ->f_pos if filldir tells us to stop
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/befs/linuxvfs.c')
-rw-r--r--fs/befs/linuxvfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 8615ee89ab55..f95dddced968 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -265,8 +265,8 @@ befs_readdir(struct file *filp, void *dirent, filldir_t filldir)
result = filldir(dirent, keybuf, keysize, filp->f_pos,
(ino_t) value, d_type);
}
-
- filp->f_pos++;
+ if (!result)
+ filp->f_pos++;
befs_debug(sb, "<--- befs_readdir() filp->f_pos %Ld", filp->f_pos);