diff options
author | 2024-09-06 14:14:01 +0800 | |
---|---|---|
committer | 2024-11-12 23:54:14 -0500 | |
commit | a90825898becb730377b157884c82a725f1d3ffa (patch) | |
tree | e300340dabbfadc6bb063c0673b82f1c8ccac43f /fs/ext4/extents.c | |
parent | ext4: mark ctx_*_flags() with __maybe_unused (diff) | |
download | wireguard-linux-a90825898becb730377b157884c82a725f1d3ffa.tar.xz wireguard-linux-a90825898becb730377b157884c82a725f1d3ffa.zip |
ext4: don't pass full mapping flags to ext4_es_insert_extent()
When converting a delalloc extent in ext4_es_insert_extent(), since we
only want to pass the info of whether the quota has already been claimed
if the allocation is a direct allocation from ext4_map_create_blocks(),
there is no need to pass full mapping flags, so changes to just pass
whether the EXT4_GET_BLOCKS_DELALLOC_RESERVE bit is set.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240906061401.2980330-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to '')
-rw-r--r-- | fs/ext4/extents.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 34e25eee6521..c144fe43a29f 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -3138,7 +3138,7 @@ static void ext4_zeroout_es(struct inode *inode, struct ext4_extent *ex) return; ext4_es_insert_extent(inode, ee_block, ee_len, ee_pblock, - EXTENT_STATUS_WRITTEN, 0); + EXTENT_STATUS_WRITTEN, false); } /* FIXME!! we need to try to merge to left or right after zero-out */ @@ -4158,7 +4158,7 @@ insert_hole: /* Put just found gap into cache to speed up subsequent requests */ ext_debug(inode, " -> %u:%u\n", hole_start, len); ext4_es_insert_extent(inode, hole_start, len, ~0, - EXTENT_STATUS_HOLE, 0); + EXTENT_STATUS_HOLE, false); /* Update hole_len to reflect hole size after lblk */ if (hole_start != lblk) |