mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-01 00:36:40 +09:00
ext4: fix error handling in ext4_ind_get_blocks()
(cherry picked from commit 2bba702d4f)
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
43e932d311
commit
cd9c823a68
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user