[PATCH 074/102] xfs: using GFP_NOFS for blkdev_issue_flush

Dave Chinner david at fromorbit.com
Thu Aug 23 00:02:32 CDT 2012


From: Shaohua Li <shli at kernel.org>

Upstream commit: 7582df516c93046b8d2111a780c69de77f9882fb

Issuing a block device flush request in transaction context using GFP_KERNEL
directly can cause deadlocks due to memory reclaim recursion. Use GFP_NOFS to
avoid recursion from reclaim context.

Signed-off-by: Shaohua Li <shli at fusionio.com>
Reviewed-by: Mark Tinguely <tinguely at sgi.com>
Signed-off-by: Ben Myers <bpm at sgi.com>
---
 fs/xfs/linux-2.6/xfs_super.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 9c7f4b9..2cf0967 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -631,7 +631,7 @@ void
 xfs_blkdev_issue_flush(
 	xfs_buftarg_t		*buftarg)
 {
-	blkdev_issue_flush(buftarg->bt_bdev, GFP_KERNEL, NULL);
+	blkdev_issue_flush(buftarg->bt_bdev, GFP_NOFS, NULL);
 }
 
 STATIC void
-- 
1.7.10



More information about the xfs mailing list