From: Akinobu Mita Date: Mon, 28 Apr 2008 09:16:00 +0000 (-0700) Subject: ext2: improve ext2_readdir() return value X-Git-Tag: v2.6.26-rc1~764 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=bbff28602436cc7ca660757bba81f03b99e8586d;p=linux-2.6-omap-h63xx.git ext2: improve ext2_readdir() return value Improve ext2_readdir() return value for ext2_get_page() failure by using the actual result of ext2_get_page(). Signed-off-by: Akinobu Mita Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 8dededd80fe..a0995eb2dc2 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -299,7 +299,7 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) "bad page in #%lu", inode->i_ino); filp->f_pos += PAGE_CACHE_SIZE - offset; - return -EIO; + return PTR_ERR(page); } kaddr = page_address(page); if (unlikely(need_revalidate)) {