diff options
author | Baokun Li <libaokun1@huawei.com> | 2023-04-24 11:38:43 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-06-26 19:35:12 -0400 |
commit | ed5d285b3f2a9a37ff778c5e440daf49351fcc4d (patch) | |
tree | ba2e3946e1f13876235997a1af8feb0bd6610894 /fs/ext4/inode.c | |
parent | 2a69c450083db164596c75c0f5b4d9c4c0e18eba (diff) |
ext4: make ext4_es_remove_extent() return void
Now ext4_es_remove_extent() never fails, so make it return void.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-10-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index ef7ec2690b84..519f5a065fdc 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3986,12 +3986,8 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length) down_write(&EXT4_I(inode)->i_data_sem); ext4_discard_preallocations(inode, 0); - ret = ext4_es_remove_extent(inode, first_block, - stop_block - first_block); - if (ret) { - up_write(&EXT4_I(inode)->i_data_sem); - goto out_stop; - } + ext4_es_remove_extent(inode, first_block, + stop_block - first_block); if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) ret = ext4_ext_remove_space(inode, first_block, |