[PATCH 2/2] f2fs: add dump_stack() in f2fs_handle_critical_error()

From: Chao Yu
Date: Tue Feb 11 2025 - 20:55:08 EST


To show call stack, so that we can see who causes critical error, note
that it won't call dump_stack() for shutdown path.

Signed-off-by: Chao Yu <chao@xxxxxxxxxx>
---
fs/f2fs/super.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 24ded06c8980..1af78b75906b 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4221,6 +4221,8 @@ void f2fs_handle_critical_error(struct f2fs_sb_info *sbi, unsigned char reason)

if (shutdown)
set_sbi_flag(sbi, SBI_IS_SHUTDOWN);
+ else
+ dump_stack();

/*
* Continue filesystem operators if errors=continue. Should not set
--
2.48.1.502.g6dc24dfdaf-goog