diff options
author | Jan Kara <jack@suse.cz> | 2009-11-23 07:24:48 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-11-23 07:24:48 -0500 |
commit | 2bba702d4f88d7b010ec37e2527b552588404ae7 (patch) | |
tree | 74f46ab1e70328f23f1abbeaf3bf1a49c15a10e8 /fs | |
parent | 6b17d902fdd241adfa4ce780df20547b28bf5801 (diff) |
ext4: fix error handling in ext4_ind_get_blocks()
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>
Cc: stable@kernel.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0c0ddc1401e..3673ec7b1c9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1022,7 +1022,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); |