xfs: avoid memory allocation under m_peraglock in growfs code
authorChristoph Hellwig <hch@infradead.org>
Sat, 18 Jul 2009 22:14:53 +0000 (18:14 -0400)
committerFelix Blyakher <felixb@sgi.com>
Tue, 11 Aug 2009 15:21:13 +0000 (10:21 -0500)
commitefe1f30e8f05a3836dfcf6302774707b3b47193f
tree7935e5790585b679207391c78f272685e2b475b9
parenta81655ae5a9da16a08ba14637dc6c10217e57492
xfs: avoid memory allocation under m_peraglock in growfs code

Allocate the memory for the larger m_perag array before taking the
per-AG lock as the per-AG lock can be taken under the i_lock which
can be taken from reclaim context.

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>
fs/xfs/xfs_fsops.c