summaryrefslogtreecommitdiff
path: root/fs/ext4/extents_status.c
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-04-24 06:38:45 +0300
committerTheodore Ts'o <tytso@mit.edu>2023-06-27 02:35:12 +0300
commit6c120399cde6b1b5cf65ce403765c579fb3d3e50 (patch)
tree165028978e7ce2ad0e7acaa0678fd175ce418e41 /fs/ext4/extents_status.c
parent8782b020ccbef6c4b62f00c86423f4d37ec60932 (diff)
downloadlinux-6c120399cde6b1b5cf65ce403765c579fb3d3e50.tar.xz
ext4: make ext4_es_insert_extent() return void
Now ext4_es_insert_extent() never return error, 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-12-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.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 6a020e600d58..9b5b8951afb4 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -829,12 +829,10 @@ out:
/*
* ext4_es_insert_extent() adds information to an inode's extent
* status tree.
- *
- * Return 0 on success, error code on failure.
*/
-int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
- ext4_lblk_t len, ext4_fsblk_t pblk,
- unsigned int status)
+void ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
+ ext4_lblk_t len, ext4_fsblk_t pblk,
+ unsigned int status)
{
struct extent_status newes;
ext4_lblk_t end = lblk + len - 1;
@@ -845,13 +843,13 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
struct extent_status *es2 = NULL;
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
- return 0;
+ return;
es_debug("add [%u/%u) %llu %x to extent status tree of inode %lu\n",
lblk, len, pblk, status, inode->i_ino);
if (!len)
- return 0;
+ return;
BUG_ON(end < lblk);
@@ -903,7 +901,7 @@ error:
goto retry;
ext4_es_print_tree(inode);
- return 0;
+ return;
}
/*