Skip to content

Commit 1534f72

Browse files
chuguangqingtytso
authored andcommitted
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@inspur.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent b320789 commit 1534f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value,
15301530
WARN_ON_ONCE(ext4_handle_valid(journal_current_handle()) &&
15311531
!(current->flags & PF_MEMALLOC_NOFS));
15321532

1533-
ea_data = kvmalloc(value_len, GFP_KERNEL);
1533+
ea_data = kvmalloc(value_len, GFP_NOFS);
15341534
if (!ea_data) {
15351535
mb_cache_entry_put(ea_inode_cache, ce);
15361536
return NULL;

0 commit comments

Comments
 (0)