Skip to content

Commit

Permalink
xfs: switch to NOFS allocation under i_lock in xfs_da_state_alloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Felix Blyakher committed Aug 12, 2009
1 parent ca35dcd commit f41d7fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_da_btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,7 @@ kmem_zone_t *xfs_dabuf_zone; /* dabuf zone */
xfs_da_state_t *
xfs_da_state_alloc(void)
{
return kmem_zone_zalloc(xfs_da_state_zone, KM_SLEEP);
return kmem_zone_zalloc(xfs_da_state_zone, KM_NOFS);
}

/*
Expand Down

0 comments on commit f41d7fb

Please sign in to comment.