Re: [RFC 4/6] ext4: replace kthread freezing with auto fs freezing

From: Jan Kara
Date: Wed Mar 26 2025 - 13:57:28 EST


On Wed 26-03-25 04:22:18, Luis Chamberlain wrote:
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 0d523e9fb3d5..ae235ec5ff3a 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -6782,7 +6782,7 @@ static ext4_grpblk_t ext4_last_grp_cluster(struct super_block *sb,
>
> static bool ext4_trim_interrupted(void)
> {
> - return fatal_signal_pending(current) || freezing(current);
> + return fatal_signal_pending(current);
> }

I think this is wrong. ext4_trim_interrupted() gets called from a normal
process that's doing fstrim (which can take a long time and we don't want
to block system suspend with it). So IMO this should stay as is.

Otherwise the patch looks good to me.

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR