Commit 27a97a61 authored by Volker Lendecke's avatar Volker Lendecke Committed by Steve French

[CIFS] Slightly simplify wait_for_free_request(), remove an unnecessary "else" branch

This is no functional change, because in the "if" branch we do an early
"return 0;".
Signed-off-by: default avatarVolker Lendecke <vl@samba.org>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 8fbbd365
...@@ -344,7 +344,9 @@ static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) ...@@ -344,7 +344,9 @@ static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op)
if (long_op == CIFS_ASYNC_OP) { if (long_op == CIFS_ASYNC_OP) {
/* oplock breaks must not be held up */ /* oplock breaks must not be held up */
atomic_inc(&ses->server->inFlight); atomic_inc(&ses->server->inFlight);
} else { return 0;
}
spin_lock(&GlobalMid_Lock); spin_lock(&GlobalMid_Lock);
while (1) { while (1) {
if (atomic_read(&ses->server->inFlight) >= if (atomic_read(&ses->server->inFlight) >=
...@@ -376,7 +378,6 @@ static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) ...@@ -376,7 +378,6 @@ static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op)
break; break;
} }
} }
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment