[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_D6CD42314E6CD7A9ABA771CF10C464390005@qq.com>
Date: Sat, 24 Jun 2023 23:52:59 +0800
From: Wang Jianjian <wangjianjian0@...mail.com>
To: linux-ext4@...r.kernel.org
Cc: wangjianjian0@...mail.com
Subject: [PATCH] ext4: Free data blocks directly for ordered journal
---
fs/ext4/mballoc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 7b2e36d103cb..41fdc2f8c061 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -6206,7 +6206,7 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
* consistency guarantees.
*/
if (ext4_handle_valid(handle) &&
- ((flags & EXT4_FREE_BLOCKS_METADATA) ||
+ ((ext4_should_order_data(inode) && (flags & EXT4_FREE_BLOCKS_METADATA)) ||
!ext4_should_writeback_data(inode))) {
struct ext4_free_data *new_entry;
/*
--
2.34.3
Powered by blists - more mailing lists