From: akpm@linux-foundation.org Subject: [patch 261/307] ext2: improve ext2_readdir() return value Date: Mon, 28 Apr 2008 02:16:00 -0700 Message-ID: <200804280916.m3S9G1hI019025@imap1.linux-foundation.org> Cc: akpm@linux-foundation.org, akinobu.mita@gmail.com, linux-ext4@vger.kernel.org To: torvalds@linux-foundation.org Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:49929 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759006AbYD1JUs (ORCPT ); Mon, 28 Apr 2008 05:20:48 -0400 Sender: linux-ext4-owner@vger.kernel.org List-ID: From: Akinobu Mita 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 --- fs/ext2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/ext2/dir.c~ext2-improve-ext2_readdir-return-value fs/ext2/dir.c --- a/fs/ext2/dir.c~ext2-improve-ext2_readdir-return-value +++ a/fs/ext2/dir.c @@ -299,7 +299,7 @@ ext2_readdir (struct file * filp, void * "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)) { _