aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorShaohua Li <shli@kernel.org>2012-05-20 19:26:59 -0400
committerNeilBrown <neilb@suse.de>2012-05-20 19:26:59 -0400
commitb5e1b8cee7ad58a15d2fa79bcd7946acb592602d (patch)
treea9f009012ccdca7c9daefb089e9dbca7224843c7 /drivers/md
parentb0d634d5683f0b186b242ce6a4f3b041edb8b956 (diff)
md: using GFP_NOIO to allocate bio for flush request
A flush request is usually issued in transaction commit code path, so using GFP_KERNEL to allocate memory for flush request bio falls into the classic deadlock issue. This is suitable for any -stable kernel to which it applies as it avoids a possible deadlock. Cc: stable@vger.kernel.org Signed-off-by: Shaohua Li <shli@fusionio.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 01233d855eb2..2b30ffdb81b2 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -452,7 +452,7 @@ static void submit_flushes(struct work_struct *ws)
452 atomic_inc(&rdev->nr_pending); 452 atomic_inc(&rdev->nr_pending);
453 atomic_inc(&rdev->nr_pending); 453 atomic_inc(&rdev->nr_pending);
454 rcu_read_unlock(); 454 rcu_read_unlock();
455 bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev); 455 bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
456 bi->bi_end_io = md_end_flush; 456 bi->bi_end_io = md_end_flush;
457 bi->bi_private = rdev; 457 bi->bi_private = rdev;
458 bi->bi_bdev = rdev->bdev; 458 bi->bi_bdev = rdev->bdev;