xfs: switch to NOFS allocation under i_lock in xfs_da_state_alloc

xfs_da_state_alloc is always called with i_lock held, but i_lock is taken in
reclaim context so all allocations under it must avoid recursions into the
filesystem.

Reported by the new reclaim context tracing in lockdep.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>

authored by Christoph Hellwig and committed by Felix Blyakher f41d7fb9 ca35dcd6

+1 -1
+1 -1
fs/xfs/xfs_da_btree.c
··· 2201 2201 xfs_da_state_t * 2202 2202 xfs_da_state_alloc(void) 2203 2203 { 2204 - return kmem_zone_zalloc(xfs_da_state_zone, KM_SLEEP); 2204 + return kmem_zone_zalloc(xfs_da_state_zone, KM_NOFS); 2205 2205 } 2206 2206 2207 2207 /*