Simplify allocate_mid() slightly: Remove some unnecessary "else" branches
authorVolker Lendecke <vl@samba.org>
Sat, 6 Dec 2008 12:12:34 +0000 (13:12 +0100)
committerSteve French <sfrench@us.ibm.com>
Fri, 26 Dec 2008 02:29:12 +0000 (02:29 +0000)
Simplify allocate_mid() slightly: Remove some unnecessary "else" branches

Signed-off-by: Volker Lendecke <vl@samba.org>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/transport.c

index e80210693ff70c964a17b636f041fb1c644749d8..c98f929315f24b1811bc4f928bb1ccbd9f6dee48 100644 (file)
@@ -385,10 +385,14 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf,
 {
        if (ses->server->tcpStatus == CifsExiting) {
                return -ENOENT;
-       } else if (ses->server->tcpStatus == CifsNeedReconnect) {
+       }
+
+       if (ses->server->tcpStatus == CifsNeedReconnect) {
                cFYI(1, ("tcp session dead - return to caller to retry"));
                return -EAGAIN;
-       } else if (ses->status != CifsGood) {
+       }
+
+       if (ses->status != CifsGood) {
                /* check if SMB session is bad because we are setting it up */
                if ((in_buf->Command != SMB_COM_SESSION_SETUP_ANDX) &&
                        (in_buf->Command != SMB_COM_NEGOTIATE))