diff options
author | Jan Blunck <j.blunck@tu-harburg.de> | 2004-07-28 09:11:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-07-28 09:11:25 -0700 |
commit | c885402922196a90898745a48e6097db9630b64c (patch) | |
tree | f6c29a577d246d1a6c891fff66f18a75569f1749 /fs | |
parent | 279053cae829e2df3410be68f4dc2b954872f206 (diff) | |
download | history-c885402922196a90898745a48e6097db9630b64c.tar.gz |
[PATCH] ext2_readdir() return value fix
ext2_readdir() is ignoring the set error return values and always returns
0.
Signed-off-by: Jan Blunck <j.blunck@tu-harburg.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext2/dir.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 4f24afb643c001..6af27658b60c76 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -257,10 +257,10 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) unsigned chunk_mask = ~(ext2_chunk_size(inode)-1); unsigned char *types = NULL; int need_revalidate = (filp->f_version != inode->i_version); - int ret = 0; + int ret; if (pos > inode->i_size - EXT2_DIR_REC_LEN(1)) - goto done; + goto success; if (EXT2_HAS_INCOMPAT_FEATURE(sb, EXT2_FEATURE_INCOMPAT_FILETYPE)) types = ext2_filetype_table; @@ -300,17 +300,19 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) le32_to_cpu(de->inode), d_type); if (over) { ext2_put_page(page); - goto done; + goto success; } } } ext2_put_page(page); } +success: + ret = 0; done: filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset; filp->f_version = inode->i_version; - return 0; + return ret; } /* |