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 target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux