Re: [PATCHv2 RESENDv2 2/9] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs

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

 



> - *
> + * Called with tpg_lun_lock held & irqs off
>   */

Instead of writing this down the code should assert the pre-conditions, e.g.

	assert_spin_locked(&tpg->tpg_lun_lock);
	WARN_ON_ONCE(!irqs_disabled());

>  	if (core_enable_device_list_for_node(lun, lacl, lacl->mapped_lun,
>  			lun_access, nacl, tpg) < 0)
> -		return -EINVAL;
> +	{

Wrong brace placement.

Also I can't see that anything ensures disabled irqs here.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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