Re: [PATCH 6/6] target: Send UA when changing LUN inventory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +		hlist_for_each_entry_rcu(tmp, &nacl->lun_entry_hlist, link) {
> +			if (tmp == new)
> +				continue;
> +			core_scsi3_ua_allocate(tmp, 0x3F,
> +				ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
> +		}
> +		rcu_read_unlock();
> +

> +	rcu_read_lock();
> +	hlist_for_each_entry_rcu(tmp, &nacl->lun_entry_hlist, link) {
> +		if (tmp == new)
> +			continue;
> +		core_scsi3_ua_allocate(tmp, 0x3F,
> +			ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
> +	}
> +	rcu_read_unlock();

> +
> +	rcu_read_lock();
> +	hlist_for_each_entry_rcu(tmp, &nacl->lun_entry_hlist, link)
> +		core_scsi3_ua_allocate(tmp, 0x3F,
> +			ASCQ_3FH_REPORTED_LUNS_DATA_HAS_CHANGED);
> +	rcu_read_unlock();

Please add a helper instead of duplicating this three times.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux