From: Al Viro Date: Wed, 22 May 2013 17:41:26 +0000 (-0400) Subject: befs_readdir(): do not increment ->f_pos if filldir tells us to stop X-Git-Tag: v3.10-rc4~6^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=448293aadb54ab38b9c053bf9f1eecafdc0ed214;p=platform%2Fkernel%2Flinux-3.10.git befs_readdir(): do not increment ->f_pos if filldir tells us to stop Signed-off-by: Al Viro --- diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 8615ee8..f95dddce 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);