Skip to content

Commit b5e1b8c

Browse files
Shaohua Lineilbrown
authored andcommitted
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>
1 parent b0d634d commit b5e1b8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/md/md.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ static void submit_flushes(struct work_struct *ws)
452452
atomic_inc(&rdev->nr_pending);
453453
atomic_inc(&rdev->nr_pending);
454454
rcu_read_unlock();
455-
bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
455+
bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
456456
bi->bi_end_io = md_end_flush;
457457
bi->bi_private = rdev;
458458
bi->bi_bdev = rdev->bdev;

0 commit comments

Comments
 (0)