blk: pass from_schedule to non-request unplug functions.

This will allow md/raid to know why the unplug was called,
and will be able to act according - if !from_schedule it
is safe to perform tasks which could themselves schedule.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/block/blk-core.c b/block/blk-core.c
index 35bf4fe..4b4dbdf 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2909,7 +2909,7 @@
 
 }
 
-static void flush_plug_callbacks(struct blk_plug *plug)
+static void flush_plug_callbacks(struct blk_plug *plug, bool from_schedule)
 {
 	LIST_HEAD(callbacks);
 
@@ -2921,7 +2921,7 @@
 							  struct blk_plug_cb,
 							  list);
 			list_del(&cb->list);
-			cb->callback(cb);
+			cb->callback(cb, from_schedule);
 		}
 	}
 }
@@ -2961,7 +2961,7 @@
 
 	BUG_ON(plug->magic != PLUG_MAGIC);
 
-	flush_plug_callbacks(plug);
+	flush_plug_callbacks(plug, from_schedule);
 	if (list_empty(&plug->list))
 		return;