Skip to content

Commit 45f69d0

Browse files
Long Licmaiolino
authored andcommitted
xfs: eliminate lockdep false positives in xfs_attr_shortform_list
xfs_attr_shortform_list() only called from a non-transactional context, it hold ilock before alloc memory and maybe trapped in memory reclaim. Since commit 204fae3("xfs: clean up remaining GFP_NOFS users") removed GFP_NOFS flag, lockdep warning will be report as [1]. Eliminate lockdep false positives by use __GFP_NOLOCKDEP to alloc memory in xfs_attr_shortform_list(). [1] https://lore.kernel.org/linux-xfs/[email protected]/ Reported-by: [email protected] Signed-off-by: Long Li <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent 28eb75e commit 45f69d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/xfs_attr_list.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ xfs_attr_shortform_list(
114114
* It didn't all fit, so we have to sort everything on hashval.
115115
*/
116116
sbsize = sf->count * sizeof(*sbuf);
117-
sbp = sbuf = kmalloc(sbsize, GFP_KERNEL | __GFP_NOFAIL);
117+
sbp = sbuf = kmalloc(sbsize,
118+
GFP_KERNEL | __GFP_NOLOCKDEP | __GFP_NOFAIL);
118119

119120
/*
120121
* Scan the attribute list for the rest of the entries, storing

0 commit comments

Comments
 (0)