From: Linus Torvalds Date: Fri, 28 Oct 2016 16:27:58 +0000 (-0700) Subject: Merge tag 'dm-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e0f3e6a7ccc002be056b6a21768fceee0d44941e;p=openwrt%2Fstaging%2Fblogic.git Merge tag 'dm-4.9-fixes' of git://git./linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - a couple DM raid and DM mirror fixes - a couple .request_fn request-based DM NULL pointer fixes - a fix for a DM target reference count leak, on target load error, that prevented associated DM target kernel module(s) from being removed * tag 'dm-4.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm table: fix missing dm_put_target_type() in dm_table_add_target() dm rq: clear kworker_task if kthread_run() returned an error dm: free io_barrier after blk_cleanup_queue call dm raid: fix activation of existing raid4/10 devices dm mirror: use all available legs on multiple failures dm mirror: fix read error on recovery after default leg failure dm raid: fix compat_features validation --- e0f3e6a7ccc002be056b6a21768fceee0d44941e diff --cc drivers/md/dm-rq.c index dc75bea0d541,63e43f261cce..1d0d2adc050a --- a/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c @@@ -853,11 -853,14 +853,14 @@@ int dm_old_init_request_queue(struct ma blk_queue_prep_rq(md->queue, dm_old_prep_fn); /* Initialize the request-based DM worker thread */ - init_kthread_worker(&md->kworker); + kthread_init_worker(&md->kworker); md->kworker_task = kthread_run(kthread_worker_fn, &md->kworker, "kdmwork-%s", dm_device_name(md)); - if (IS_ERR(md->kworker_task)) - return PTR_ERR(md->kworker_task); + if (IS_ERR(md->kworker_task)) { + int error = PTR_ERR(md->kworker_task); + md->kworker_task = NULL; + return error; + } elv_register_queue(md->queue);