From: akpm@linux-foundation.org Subject: + ext4-check-for-the-correct-error-return-from-ext4_ext_get_blocks.patch added to -mm tree Date: Mon, 03 Dec 2007 21:46:37 -0800 Message-ID: <200712040546.lB45kbVn003121@imap1.linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Cc: aneesh.kumar@linux.vnet.ibm.com, linux-ext4@vger.kernel.org To: mm-commits@vger.kernel.org Return-path: Sender: mm-commits-owner@vger.kernel.org List-Id: linux-ext4.vger.kernel.org The patch titled ext4: check for the correct error return from ext4_ext_get_blocks has been added to the -mm tree. Its filename is ext4-check-for-the-correct-error-return-from-ext4_ext_get_blocks.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ext4: check for the correct error return from ext4_ext_get_blocks From: "Aneesh Kumar K.V" ext4_ext_get_blocks returns negative values on error. We should check for <= 0 Signed-off-by: Aneesh Kumar K.V Cc: Signed-off-by: Andrew Morton --- fs/ext4/extents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN fs/ext4/extents.c~ext4-check-for-the-correct-error-return-from-ext4_ext_get_blocks fs/ext4/extents.c --- a/fs/ext4/extents.c~ext4-check-for-the-correct-error-return-from-ext4_ext_get_blocks +++ a/fs/ext4/extents.c @@ -2628,8 +2628,8 @@ retry: ret = ext4_ext_get_blocks(handle, inode, block, max_blocks, &map_bh, EXT4_CREATE_UNINITIALIZED_EXT, 0); - WARN_ON(!ret); - if (!ret) { + WARN_ON(ret <= 0); + if (ret <= 0) { ext4_error(inode->i_sb, "ext4_fallocate", "ext4_ext_get_blocks returned 0! inode#%lu" ", block=%lu, max_blocks=%lu", _ Patches currently in -mm which might be from aneesh.kumar@linux.vnet.ibm.com are origin.patch ext2-return-after-ext2_error-in-case-of-failures.patch ext2-change-the-default-behaviour-on-error.patch add-buffer-head-related-helper-functions.patch ext2-add-block-bitmap-validation.patch ext3-add-block-bitmap-validation.patch ext4-add-block-bitmap-validation.patch ext4-check-for-the-correct-error-return-from-ext4_ext_get_blocks.patch ext3-return-after-ext3_error-in-case-of-failures.patch ext3-change-the-default-behaviour-on-error.patch