Re: [PATCH 5/7] BNX2I: Fixed the TCP graceful termination initiation

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

 



On 06/25/2010 08:39 PM, Eddie Wai wrote:
  		if (session) {
  			spin_lock_bh(&session->lock);
-			if (session->state == ISCSI_STATE_LOGGING_OUT)
+			if (bnx2i_ep->state != EP_STATE_TCP_FIN_RCVD) {
+				if (session->state == ISCSI_STATE_LOGGING_OUT) {
+					if (bnx2i_ep->state ==
+					    EP_STATE_LOGOUT_SENT) {
+						/* Logout sent, but no resp */
+						printk(KERN_ALERT "bnx2i - "
+						"WARNING logout response"
+						" was not received!\n");
+					} else if (bnx2i_ep->state ==
+						   EP_STATE_LOGOUT_RESP_RCVD)
+						close = 1;
+				}
+			} else
  				close = 1;
+

I think you can make this chunk easier to read if you did

If (!test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic))
	goto out;

then do the:

if (session) {
	........

It gives you an extra tab so you do not have break up some lines, the tabbing/spacing will be right on the printk text, and and your eyes do not get crammed looking at the far right corner so much.
--
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