Skip to content

Commit 6e8f57f

Browse files
Davidlohr Buesobrauner
authored andcommitted
fs/ext4: use sleeping version of sb_find_get_block()
Enable ext4_free_blocks() to use it, which has a cond_resched to begin with. Convert to the new nonatomic flavor to benefit from potential performance benefits and adapt in the future vs migration such that semantics are kept. Suggested-by: Jan Kara <jack@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://kdevops.org/ext4/v6.15-rc2.html # [0] Link: https://lore.kernel.org/all/aAAEvcrmREWa1SKF@bombadil.infradead.org/ # [1] Link: https://lore.kernel.org/20250418015921.132400-7-dave@stgolabs.net Tested-by: kdevops@lists.linux.dev Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent f76d4c2 commit 6e8f57f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ext4/mballoc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6642,7 +6642,8 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
66426642
for (i = 0; i < count; i++) {
66436643
cond_resched();
66446644
if (is_metadata)
6645-
bh = sb_find_get_block(inode->i_sb, block + i);
6645+
bh = sb_find_get_block_nonatomic(inode->i_sb,
6646+
block + i);
66466647
ext4_forget(handle, is_metadata, inode, bh, block + i);
66476648
}
66486649
}

0 commit comments

Comments
 (0)