xfs: using GFP_NOFS for blkdev_issue_flush
authorShaohua Li <shli@kernel.org>
Tue, 24 Apr 2012 13:23:46 +0000 (21:23 +0800)
committerBen Myers <bpm@sgi.com>
Mon, 14 May 2012 21:20:23 +0000 (16:20 -0500)
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@fusionio.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_super.c

index b5aafc395ea16d1cbbd373c479687fd50248087a..28d1f508b578f7a48833c509b8334ed05aa02201 100644 (file)
@@ -622,7 +622,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