From 55e7e1f223d9648b3758622a8ca7af058f7c980a Mon Sep 17 00:00:00 2001 From: Yuezhang Mo Date: Mon, 14 Oct 2024 16:45:47 +0800 Subject: [PATCH] exfat: check shutdown flag before truncate Signed-off-by: Yuezhang Mo --- fs/exfat/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/exfat/file.c b/fs/exfat/file.c index a25d7eb789f4..979a17919c21 100644 --- a/fs/exfat/file.c +++ b/fs/exfat/file.c @@ -245,6 +245,9 @@ void exfat_truncate(struct inode *inode) struct exfat_inode_info *ei = EXFAT_I(inode); int err; + if (unlikely(exfat_forced_shutdown(sb))) + return; + mutex_lock(&sbi->s_lock); if (ei->start_clu == 0) { /* -- 2.34.1