Re: [PATCH 19/21] target: Change the return type of transport_register_session() into int

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

 



On Tue, Jan 05, 2016 at 02:56:13PM +0100, Bart Van Assche wrote:
> Additionally, introduce the new function
> transport_register_session_with_nacl(). This patch does not change
> any functionality but makes the next two patches easier to review.

The introduction of __transport_register_session_with_nacl probably
should be patch 1, and the return values should be a separate patch.

>  	/*
> -	 * Used by struct se_node_acl's under ConfigFS to locate active se_session-t
> +	 * Used by struct se_node_acl's under ConfigFS to locate active session.
>  	 *

Give that this isn't related to configfs and you're touching the comment
anyway how about shortening this a bit or removing this not very useful
part of the comment entirely?

>  	 * Only set for struct se_session's that will actually be moving I/O.
>  	 * eg: *NOT* discovery sessions.

s/se_session/session/ if you do that above.

>  {
>  	unsigned long flags;
> +	int ret = 0;
>  
>  	spin_lock_irqsave(&se_tpg->session_lock, flags);
>  	__transport_register_session(se_tpg, se_nacl, se_sess, fabric_sess_ptr);
>  	spin_unlock_irqrestore(&se_tpg->session_lock, flags);
> +
> +	return ret;

To be useful you'd need to assign the return value of 
__transport_register_session 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