mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
scst, copy manager: Only submit INQUIRY if LUN lookup succeeded (merge r8503 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2668,6 +2668,7 @@ out:
|
||||
|
||||
void scst_cm_update_dev(struct scst_device *dev)
|
||||
{
|
||||
unsigned int lun;
|
||||
int rc, res;
|
||||
|
||||
TRACE_ENTRY();
|
||||
@@ -2685,7 +2686,11 @@ void scst_cm_update_dev(struct scst_device *dev)
|
||||
scst_block_dev(dev);
|
||||
spin_unlock_bh(&dev->dev_lock);
|
||||
|
||||
rc = scst_cm_send_init_inquiry(dev, scst_cm_get_lun(dev), NULL);
|
||||
lun = scst_cm_get_lun(dev);
|
||||
if (WARN_ON_ONCE(lun == SCST_MAX_LUN))
|
||||
goto out_unblock;
|
||||
|
||||
rc = scst_cm_send_init_inquiry(dev, lun, NULL);
|
||||
if (rc != 0)
|
||||
goto out_unblock;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user