Skip to content

Commit bb7d0d1

Browse files
chuguangqinggregkh
authored andcommitted
fs: ext4: change GFP_KERNEL to GFP_NOFS to avoid deadlock
[ Upstream commit 1534f72 ] 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 <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent b2eef65 commit bb7d0d1

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
@@ -1499,7 +1499,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value,
14991499
WARN_ON_ONCE(ext4_handle_valid(journal_current_handle()) &&
15001500
!(current->flags & PF_MEMALLOC_NOFS));
15011501

1502-
ea_data = kvmalloc(value_len, GFP_KERNEL);
1502+
ea_data = kvmalloc(value_len, GFP_NOFS);
15031503
if (!ea_data) {
15041504
mb_cache_entry_put(ea_inode_cache, ce);
15051505
return NULL;

0 commit comments

Comments
 (0)