summaryrefslogtreecommitdiff
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2023-04-24 06:38:43 +0300
committerTheodore Ts'o <tytso@mit.edu>2023-06-27 02:35:12 +0300
commited5d285b3f2a9a37ff778c5e440daf49351fcc4d (patch)
treeba2e3946e1f13876235997a1af8feb0bd6610894 /fs/ext4/inline.c
parent2a69c450083db164596c75c0f5b4d9c4c0e18eba (diff)
downloadlinux-ed5d285b3f2a9a37ff778c5e440daf49351fcc4d.tar.xz
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/inline.c')
-rw-r--r--fs/ext4/inline.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index f48183f91c87..a4b7e4bc32d4 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1939,16 +1939,8 @@ int ext4_inline_data_truncate(struct inode *inode, int *has_inline)
* the extent status cache must be cleared to avoid leaving
* behind stale delayed allocated extent entries
*/
- if (!ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
-retry:
- err = ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS);
- if (err == -ENOMEM) {
- memalloc_retry_wait(GFP_ATOMIC);
- goto retry;
- }
- if (err)
- goto out_error;
- }
+ if (!ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA))
+ ext4_es_remove_extent(inode, 0, EXT_MAX_BLOCKS);
/* Clear the content in the xattr space. */
if (inline_size > EXT4_MIN_INLINE_DATA_SIZE) {