Commit bbff2860 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 31f68e13
...@@ -299,7 +299,7 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) ...@@ -299,7 +299,7 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
"bad page in #%lu", "bad page in #%lu",
inode->i_ino); inode->i_ino);
filp->f_pos += PAGE_CACHE_SIZE - offset; filp->f_pos += PAGE_CACHE_SIZE - offset;
return -EIO; return PTR_ERR(page);
} }
kaddr = page_address(page); kaddr = page_address(page);
if (unlikely(need_revalidate)) { if (unlikely(need_revalidate)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment