Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=221879c927df05280283a4de6124806c17cc44d4 Commit: 221879c927df05280283a4de6124806c17cc44d4 Parent: f5a7a6b0d9b6af7d46124ed3f6b3995225cb62d0 Author: Aneesh Kumar K.V <[EMAIL PROTECTED]> AuthorDate: Mon Jan 28 23:58:27 2008 -0500 Committer: Theodore Ts'o <[EMAIL PROTECTED]> CommitDate: Mon Jan 28 23:58:27 2008 -0500
ext4: Check for the correct error return from ext4_ext_get_blocks returns negative values on error. We should check for <= 0 Signed-off-by: Aneesh Kumar K.V <[EMAIL PROTECTED]> --- fs/ext4/extents.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 754c0d3..8593e59 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -2462,12 +2462,12 @@ 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=%u, max_blocks=%lu", - inode->i_ino, block, max_blocks); + "ext4_ext_get_blocks returned error: " + "inode#%lu, block=%u, max_blocks=%lu", + inode->i_ino, block, max_blocks); ret = -EIO; ext4_mark_inode_dirty(handle, inode); ret2 = ext4_journal_stop(handle); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html