diff options
author | Shaohua Li <shli@kernel.org> | 2012-05-21 09:26:59 +1000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-01 15:12:56 +0800 |
commit | 85968a996b092b9fe3bef36065e758dcd1550a23 (patch) | |
tree | f2551c242e49867c16751df0613dab17791734e4 /drivers/md/md.c | |
parent | beb9576530bc9a2685847fa1fcbf96b97686fcaf (diff) | |
download | kernel_samsung_crespo-85968a996b092b9fe3bef36065e758dcd1550a23.zip kernel_samsung_crespo-85968a996b092b9fe3bef36065e758dcd1550a23.tar.gz kernel_samsung_crespo-85968a996b092b9fe3bef36065e758dcd1550a23.tar.bz2 |
md: using GFP_NOIO to allocate bio for flush request
commit b5e1b8cee7ad58a15d2fa79bcd7946acb592602d upstream.
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.
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index a2b3f21..8b04a02 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -409,7 +409,7 @@ static void submit_flushes(struct work_struct *ws) atomic_inc(&rdev->nr_pending); atomic_inc(&rdev->nr_pending); rcu_read_unlock(); - bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev); + bi = bio_alloc_mddev(GFP_NOIO, 0, mddev); bi->bi_end_io = md_end_flush; bi->bi_private = rdev; bi->bi_bdev = rdev->bdev; |