Skip to content

Commit

Permalink
omfs: make readdir stop when filldir says so
Browse files Browse the repository at this point in the history
filldir returning an error does *not* mean "skip this entry, try the
next one"...

Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Bob Copeland <[email protected]>
  • Loading branch information
Al Viro authored and bcopeland committed Mar 5, 2011
1 parent d932805 commit 31be83a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/omfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 31be83a

Please sign in to comment.