瀏覽代碼

xfs: use GFP_NOFS for page cache allocation

Avoid a lockdep warning by preventing page cache allocation from
recursing back into the filesystem during memory reclaim.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Dave Chinner 15 年之前
父節點
當前提交
aea1b95321
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      fs/xfs/linux-2.6/xfs_aops.c

+ 2 - 2
fs/xfs/linux-2.6/xfs_aops.c

@@ -1493,8 +1493,8 @@ xfs_vm_write_begin(
 	void			**fsdata)
 	void			**fsdata)
 {
 {
 	*pagep = NULL;
 	*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);
 }
 }
 
 
 STATIC sector_t
 STATIC sector_t