Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Core-for-CI] fs: PM: Fix reverse check in filesystems_freeze_callback()
@ 2025-12-03 13:55 Chaitanya Kumar Borah
  2025-12-03 14:18 ` ✗ CI.checkpatch: warning for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Chaitanya Kumar Borah @ 2025-12-03 13:55 UTC (permalink / raw)
  To: intel-xe, intel-gfx

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

The freeze_all_ptr check in filesystems_freeze_callback() introduced by
commit a3f8f8662771 ("power: always freeze efivarfs") is reverse which
quite confusingly causes all file systems to be frozen when
filesystem_freeze_enabled is false.

On my systems it causes the WARN_ON_ONCE() in __set_task_frozen() to
trigger, most likely due to an attempt to freeze a file system that is
not ready for that.

Add a logical negation to the check in question to reverse it as
appropriate.

Fixes: a3f8f8662771 ("power: always freeze efivarfs")
Cc: 6.18+ <stable@vger.kernel.org> # 6.18+
Link: https://lore.kernel.org/linux-pm/12788397.O9o76ZdvQC@rafael.j.wysocki/
References: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15341
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
 fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/super.c b/fs/super.c
index 277b84e5c279..4c79f170ac0d 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1188,7 +1188,7 @@ static void filesystems_freeze_callback(struct super_block *sb, void *freeze_all
 	if (!sb->s_op->freeze_fs && !sb->s_op->freeze_super)
 		return;
 
-	if (freeze_all_ptr && !(sb->s_type->fs_flags & FS_POWER_FREEZE))
+	if (!freeze_all_ptr && !(sb->s_type->fs_flags & FS_POWER_FREEZE))
 		return;
 
 	if (!get_active_super(sb))
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-12-05  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 13:55 [Core-for-CI] fs: PM: Fix reverse check in filesystems_freeze_callback() Chaitanya Kumar Borah
2025-12-03 14:18 ` ✗ CI.checkpatch: warning for " Patchwork
2025-12-03 14:19 ` ✓ CI.KUnit: success " Patchwork
2025-12-04 10:02 ` [Core-for-CI] " Jani Nikula
2025-12-04 13:59 ` ✗ CI.checkpatch: warning for fs: PM: Fix reverse check in filesystems_freeze_callback() (rev2) Patchwork
2025-12-04 14:01 ` ✓ CI.KUnit: success " Patchwork
2025-12-04 15:20 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-04 16:41 ` ✓ Xe.CI.Full: " Patchwork
2025-12-05  9:19 ` [Core-for-CI] fs: PM: Fix reverse check in filesystems_freeze_callback() Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox