]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/omfs/dir.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[mv-sheeva.git] / fs / omfs / dir.c
index fd91f629ceb8bb14414eb7cabb65879410d4c903..de4ff29f1e0595c549877d16144064dae9bcbb7a 100644 (file)
@@ -361,9 +361,10 @@ static int omfs_fill_chain(struct file *filp, void *dirent, filldir_t filldir,
 
                res = filldir(dirent, oi->i_name, strnlen(oi->i_name,
                        OMFS_NAMELEN), filp->f_pos, self, d_type);
-               if (res == 0)
-                       filp->f_pos++;
                brelse(bh);
+               if (res < 0)
+                       break;
+               filp->f_pos++;
        }
 out:
        return res;