Merge tag 'for-4.16/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
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:
https://marc.info/?l=linux-scsi&m=152231276114962&w=2
- Fix a DM core ioctl permission check regression introduced in a
v4.16-rc5 commit.
* tag 'for-4.16/dm-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
dm: fix dropped return code from dm_get_bdev_for_ioctl
dm mpath: fix support for loading scsi_dh modules during table load
This commit is contained in:
@@ -887,7 +887,7 @@ static struct pgpath *parse_path(struct dm_arg_set *as, struct path_selector *ps
|
||||
|
||||
q = bdev_get_queue(p->path.dev->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->path.dev->bdev, m, attached_handler_name, &ti->error);
|
||||
if (r) {
|
||||
|
||||
+5
-3
@@ -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;
|
||||
|
||||
retry:
|
||||
r = -ENOTTY;
|
||||
@@ -492,9 +492,11 @@ retry:
|
||||
goto out;
|
||||
|
||||
bdgrab(*bdev);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user