summaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-11-23 07:24:48 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-14 09:45:02 -0800
commitcd9c823a6830d6c84f50fe7dabaf281c542d13ef (patch)
tree8a97c1d4f74878c1fb6815ee7d6349e324d9d138 /fs/ext4/inode.c
parent43e932d3116f3a74f1b5ff0a38cca5e0bac1099a (diff)
ext4: fix error handling in ext4_ind_get_blocks()
(cherry picked from commit 2bba702d4f88d7b010ec37e2527b552588404ae7) When an error happened in ext4_splice_branch we failed to notice that in ext4_ind_get_blocks and mapped the buffer anyway. Fix the problem by checking for error properly. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 68c9055a4d91..c27816a2c4fd 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1021,7 +1021,7 @@ static int ext4_ind_get_blocks(handle_t *handle, struct inode *inode,
if (!err)
err = ext4_splice_branch(handle, inode, iblock,
partial, indirect_blks, count);
- else
+ if (err)
goto cleanup;
set_buffer_new(bh_result);