Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a7d5559 authored by Shaohua Li's avatar Shaohua Li Committed by Jens Axboe
Browse files

block: stack unplug



MD raid1 prepares to dispatch request in unplug callback. If make_request in
low level queue also uses unplug callback to dispatch request, the low level
queue's unplug callback will not be called. Recheck the callback list helps
this case.

Signed-off-by: default avatarShaohua Li <shli@fusionio.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9cbb1750
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -2913,9 +2913,7 @@ static void flush_plug_callbacks(struct blk_plug *plug)
{
	LIST_HEAD(callbacks);

	if (list_empty(&plug->cb_list))
		return;

	while (!list_empty(&plug->cb_list)) {
		list_splice_init(&plug->cb_list, &callbacks);

		while (!list_empty(&callbacks)) {
@@ -2926,6 +2924,7 @@ static void flush_plug_callbacks(struct blk_plug *plug)
			cb->callback(cb);
		}
	}
}

struct blk_plug_cb *blk_check_plugged(blk_plug_cb_fn unplug, void *data,
				      int size)