xfs: I/O completion handlers must use NOFS allocations
authorChristoph Hellwig <hch@infradead.org>
Mon, 19 Oct 2009 04:00:03 +0000 (04:00 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 11 Dec 2009 21:11:20 +0000 (15:11 -0600)
commit80641dc66a2d6dfb22af4413227a92b8ab84c7bb
treef7353e4ca2bd4629b41c9ec79306d042d64f90f7
parentc56c9631cbe88f08854a56ff9776c1f310916830
xfs: I/O completion handlers must use NOFS allocations

When completing I/O requests we must not allow the memory allocator to
recurse into the filesystem, as we might deadlock on waiting for the
I/O completion otherwise.  The only thing currently allocating normal
GFP_KERNEL memory is the allocation of the transaction structure for
the unwritten extent conversion.  Add a memflags argument to
_xfs_trans_alloc to allow controlling the allocator behaviour.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Thomas Neumann <tneumann@users.sourceforge.net>
Tested-by: Thomas Neumann <tneumann@users.sourceforge.net>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_fsops.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.h