Commit c2a98384 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-4.16/dm-fixes-4' of...

Merge tag 'for-4.16/dm-fixes-4' of git://

Pull device mapper fixes from Mike Snitzer:

 - Fix a DM multipath regression introduced in a v4.16-rc6 commit:
   restore support for loading, and attaching, scsi_dh modules during
   multipath table load. Otherwise some users may find themselves unable
   to boot, as was reported today:

 - Fix a DM core ioctl permission check regression introduced in a
   v4.16-rc5 commit.

* tag 'for-4.16/dm-fixes-4' of git://
  dm: fix dropped return code from dm_get_bdev_for_ioctl
  dm mpath: fix support for loading scsi_dh modules during table load
parents d89b9f50 da5dadb4
......@@ -887,7 +887,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
q = bdev_get_queue(p->>bdev);
attached_handler_name = scsi_dh_attached_handler_name(q, GFP_KERNEL);
if (attached_handler_name) {
if (attached_handler_name || m->hw_handler_name) {
INIT_DELAYED_WORK(&p->activate_path, activate_path_work);
r = setup_scsi_dh(p->>bdev, m, attached_handler_name, &ti->error);
if (r) {
......@@ -466,7 +466,7 @@ static int dm_get_bdev_for_ioctl(struct mapped_device *md,
struct dm_target *tgt;
struct dm_table *map;
int srcu_idx, r;
int srcu_idx, r, r2;
r = -ENOTTY;
......@@ -492,9 +492,11 @@ static int dm_get_bdev_for_ioctl(struct mapped_device *md,
goto out;
r = blkdev_get(*bdev, *mode, _dm_claim_ptr);
if (r < 0)
r2 = blkdev_get(*bdev, *mode, _dm_claim_ptr);
if (r2 < 0) {
r = r2;
goto out;
dm_put_live_table(md, srcu_idx);
return r;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment