summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-06 13:12:34 +0100
committerSteve French <sfrench@us.ibm.com>2008-12-26 02:29:12 +0000
commit8fbbd365cc700e288fb6f9780b092c5afa4946e5 (patch)
tree630a08973a37ceb06709064b507535eca2664f3d
parent6d9c6d543165d1d492602c1371cb019040093584 (diff)
downloadlinux-3.10-8fbbd365cc700e288fb6f9780b092c5afa4946e5.tar.gz
linux-3.10-8fbbd365cc700e288fb6f9780b092c5afa4946e5.tar.bz2
linux-3.10-8fbbd365cc700e288fb6f9780b092c5afa4946e5.zip
Simplify allocate_mid() slightly: Remove some unnecessary "else" branches
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>
-rw-r--r--fs/cifs/transport.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index e80210693ff..c98f929315f 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -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))