[PATCH] xfs: use KM_NOFS for allocations during attribute list operations

Christoph Hellwig hch at infradead.org
Wed Dec 29 06:54:00 CST 2010


On Tue, Dec 21, 2010 at 11:56:33AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
> 
> When listing attributes, we are doiing memory allocations under the
> inode ilock using only KM_SLEEP. This allows memory allocation to
> recurse back into the filesystem and do writeback, which may the
> ilock we already hold on the current inode. THis will deadlock.
> Hence use KM_NOFS for such allocations outside of transaction
> context to ensure that reclaim recursion does not occur.
> 
> Reported-by: Nick Piggin <npiggin at gmail.com>
> Signed-off-by: Dave Chinner <dchinner at redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch at lst.de>




More information about the xfs mailing list