Quoting r. Muli Ben-Yehuda <[EMAIL PROTECTED]>:
> >  static ssize_t srp_create_target(struct class_device *class_dev,
> >                              const char *buf, size_t count)
> >  {
> >     struct srp_host *host =
> >             container_of(class_dev, struct srp_host, class_dev);
> >     struct Scsi_Host *target_host;
> > -   struct srp_target_port *target;
> > +   struct srp_target_port *target, *existing_target = NULL;
> >     int ret;
> >     int i;
> >  
> > +   /* first check if the target already exists */
> > +
> > +   mutex_lock(&host->target_mutex);
> > +   ret = srp_find_target(buf, host, &existing_target);
> > +   if (ret)
> > +           goto unlock_mutex;
> > +
> > +   if (existing_target) {
> > +           /* target already exists */
> > +           spin_lock_irq(existing_target->scsi_host->host_lock);
> 
> why _irq and not _irqsave? Are you sure this code can't ever be called
> with interrupts off via some other path?

Given the mutex_lock above, this better be true.

-- 
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to