[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250806022849.1415-2-chuguangqing@inspur.com>
Date: Wed, 6 Aug 2025 10:28:49 +0800
From: chuguangqing <chuguangqing@...pur.com>
To: <tytso@....edu>, <adilger.kernel@...ger.ca>
CC: <linux-ext4@...r.kernel.org>, <linux-kernel@...r.kernel.org>, chuguangqing
<chuguangqing@...pur.com>
Subject: [PATCH 1/1] fs: ext4: change GFP_KERNEL to GFP_NOFS to avoid deadlock
The parent function ext4_xattr_inode_lookup_create already uses GFP_NOFS for memory alloction, so the function ext4_xattr_inode_cache_find should use same gfp_flag.
Signed-off-by: chuguangqing <chuguangqing@...pur.com>
---
fs/ext4/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 5a6fe1513fd2..7743d81b2f21 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -1530,7 +1530,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value,
WARN_ON_ONCE(ext4_handle_valid(journal_current_handle()) &&
!(current->flags & PF_MEMALLOC_NOFS));
- ea_data = kvmalloc(value_len, GFP_KERNEL);
+ ea_data = kvmalloc(value_len, GFP_NOFS);
if (!ea_data) {
mb_cache_entry_put(ea_inode_cache, ce);
return NULL;
--
2.43.5
Powered by blists - more mailing lists