From ed5d285b3f2a9a37ff778c5e440daf49351fcc4d Mon Sep 17 00:00:00 2001 From: Baokun Li Date: Mon, 24 Apr 2023 11:38:43 +0800 Subject: 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 Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20230424033846.4732-10-libaokun1@huawei.com Signed-off-by: Theodore Ts'o --- fs/ext4/extents_status.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'fs/ext4/extents_status.c') diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 807ccc3107ec..b01b3bdab77d 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c @@ -1460,10 +1460,10 @@ out: * @len - number of blocks to remove * * Reduces block/cluster reservation count and for bigalloc cancels pending - * reservations as needed. Returns 0 on success, error code on failure. + * reservations as needed. */ -int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk, - ext4_lblk_t len) +void ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk, + ext4_lblk_t len) { ext4_lblk_t end; int err = 0; @@ -1471,14 +1471,14 @@ int ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk, struct extent_status *es = NULL; if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY) - return 0; + return; trace_ext4_es_remove_extent(inode, lblk, len); es_debug("remove [%u/%u) from extent status tree of inode %lu\n", lblk, len, inode->i_ino); if (!len) - return err; + return; end = lblk + len - 1; BUG_ON(end < lblk); @@ -1501,7 +1501,7 @@ retry: ext4_es_print_tree(inode); ext4_da_release_space(inode, reserved); - return 0; + return; } static int __es_shrink(struct ext4_sb_info *sbi, int nr_to_scan, -- cgit v1.2.3