Skip to content

Commit 238f7a7

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 d1dfe21 commit 238f7a7

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
@@ -1552,7 +1552,7 @@ ext4_xattr_inode_cache_find(struct inode *inode, const void *value,
15521552
WARN_ON_ONCE(ext4_handle_valid(journal_current_handle()) &&
15531553
!(current->flags & PF_MEMALLOC_NOFS));
15541554

1555-
ea_data = kvmalloc(value_len, GFP_KERNEL);
1555+
ea_data = kvmalloc(value_len, GFP_NOFS);
15561556
if (!ea_data) {
15571557
mb_cache_entry_put(ea_inode_cache, ce);
15581558
return NULL;

0 commit comments

Comments
 (0)