Skip to content

Commit

Permalink
ext4: fix error handling in ext4_ind_get_blocks()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jan Kara authored and Theodore Ts'o committed Nov 23, 2009
1 parent 6b17d90 commit 2bba702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2bba702

Please sign in to comment.