summaryrefslogtreecommitdiff
path: root/fs/ext4/extents_status.c
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-04-24 11:38:43 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-06-26 19:35:12 -0400
commited5d285b3f2a9a37ff778c5e440daf49351fcc4d (patch)
treeba2e3946e1f13876235997a1af8feb0bd6610894 /fs/ext4/extents_status.c
parent2a69c450083db164596c75c0f5b4d9c4c0e18eba (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/extents_status.c')
-rw-r--r--fs/ext4/extents_status.c12
1 files changed, 6 insertions, 6 deletions
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,