projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d932805
)
omfs: make readdir stop when filldir says so
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 4 Mar 2011 06:43:36 +0000
(
01:43
-0500)
committer
Bob Copeland
<me@bobcopeland.com>
Sat, 5 Mar 2011 21:24:12 +0000
(16:24 -0500)
filldir returning an error does *not* mean "skip this entry, try the
next one"...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
fs/omfs/dir.c
patch
|
blob
|
history
diff --git
a/fs/omfs/dir.c
b/fs/omfs/dir.c
index fd91f629ceb8bb14414eb7cabb65879410d4c903..de4ff29f1e0595c549877d16144064dae9bcbb7a 100644
(file)
--- a/
fs/omfs/dir.c
+++ b/
fs/omfs/dir.c
@@
-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;