scst_copy_mgr, initial inquiry: Hold a reference on struct scst_device

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-03-10 04:39:05 +00:00
parent 3bcc08ebed
commit ec3c6b5a11

View File

@@ -2441,6 +2441,7 @@ out_put:
scst_put_buf_full(cmd, buf);
out:
percpu_ref_put(&dev->refcnt);
TRACE_EXIT();
return;
}
@@ -2464,6 +2465,7 @@ static int scst_cm_send_init_inquiry(struct scst_device *dev,
}
priv->cm_init_inq_finish_fn = scst_cm_init_inq_finish;
priv->dev = dev;
percpu_ref_get(&dev->refcnt);
}
lun = scst_pack_lun(unpacked_lun, scst_cm_sess->acg->addr_method);