On Mon, Mar 25, 2024 at 04:38:43PM +0900, Damien Le Moal wrote:
> > +   if (hostt->device_configure)
> > +           ret = hostt->device_configure(sdev, &lim);
> > +   else if (hostt->slave_configure)
> > +           ret = hostt->slave_configure(sdev);
> > +
> > +   ret2 = queue_limits_commit_update(sdev->request_queue, &lim);
> 
> Why do this if ->device_configure() or ->slave_configure() failed ?
> Shouldn't the "if (ret) goto fail" hunk be moved above this call ?

queue_limits_commit_update unlocks the limits lock, which we'd
otherwise leak.  We could have a queue_limits_commit_abort, but
it seems a bit pointless.

> > +    *
> > +    * Note: slave_configure is the legacy version, use device_configure for
> > +    * all new code.
> 
> Maybe explictly mention that both *cannot* be defined here ?

Will do.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/open-iscsi/20240326061335.GE7108%40lst.de.

Reply via email to