[PATCH 4/5] xfs: use GFP_NOFS for page cache allocation
Christoph Hellwig
hch at infradead.org
Fri Jul 16 00:21:49 CDT 2010
On Thu, Jul 15, 2010 at 10:38:19AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner at redhat.com>
>
> Avoid a lockdep warning by preventing page cache allocation from
> recursing back into the filesystem during memory reclaim.
Yeah, I already have this in my queue too. Noticed that we don't
need it because of i_mutex as suggested in the stack overflow thread,
but for the XFS ilock.
> @@ -1501,8 +1501,9 @@ xfs_vm_write_begin(
> void **fsdata)
> {
> *pagep = NULL;
> - return block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
> - xfs_get_blocks);
> + return block_write_begin(file, mapping, pos, len,
> + (flags | AOP_FLAG_NOFS),
> + pagep, fsdata, xfs_get_blocks);
No need for the bracing:
return block_write_begin(file, mapping, pos, len, flags | AOP_FLAG_NOFS,
pagep, fsdata, xfs_get_blocks);
And with my truncate rework in the vfs tree we'll get rejection galore in
linux-next, but Stephen has been pretty good at handling these..
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list