From: NeilBrown Date: Thu, 1 Mar 2007 04:11:42 +0000 (-0800) Subject: [PATCH] md: clean out unplug and other queue function on md shutdown X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1b5380c7f794da16e815c34e54ee7641db8a288;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] md: clean out unplug and other queue function on md shutdown The mddev and queue might be used for another array which does not set these, so they need to be cleared. Signed-off-by: NeilBrown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index c8c40c361532..b5744b1bd2ba 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3322,6 +3322,9 @@ static int do_md_stop(mddev_t * mddev, int mode) set_disk_ro(disk, 0); blk_queue_make_request(mddev->queue, md_fail_request); mddev->pers->stop(mddev); + mddev->queue->merge_bvec_fn = NULL; + mddev->queue->unplug_fn = NULL; + mddev->queue->issue_flush_fn = NULL; if (mddev->pers->sync_request) sysfs_remove_group(&mddev->kobj, &md_redundancy_group);