diff options
author | Steve French <sfrench@us.ibm.com> | 2006-07-16 23:33:15 +0200 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-08-11 23:28:02 +0200 |
commit | 5da07b0208066fd3544ecf2b521fc7a2e0228ad5 (patch) | |
tree | 915422bc93ad4fde6cbacbf980b5cd4adc32b7a7 /fs | |
parent | [CIFS] spinlock protect read of last srv response time in timeout path (diff) | |
download | linux-5da07b0208066fd3544ecf2b521fc7a2e0228ad5.tar.xz linux-5da07b0208066fd3544ecf2b521fc7a2e0228ad5.zip |
[CIFS] Make midState usage more consistent
Although harmless, we were sometimes treating midState like it contained
flags but they are exclusive states, and this makes that more clear.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
(cherry picked from 586c057c3a68dd6ae0f3ba94fbf76798b1558074 commit)
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/transport.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index d16e6032d4cf..748b0df07a73 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -448,13 +448,13 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, for (;;) { curr_timeout = timeout + jiffies; wait_event(ses->server->response_q, - (!(midQ->midState & MID_REQUEST_SUBMITTED)) || + (!(midQ->midState == MID_REQUEST_SUBMITTED)) || time_after(jiffies, curr_timeout) || ((ses->server->tcpStatus != CifsGood) && (ses->server->tcpStatus != CifsNew))); if (time_after(jiffies, curr_timeout) && - (midQ->midState & MID_REQUEST_SUBMITTED) && + (midQ->midState == MID_REQUEST_SUBMITTED) && ((ses->server->tcpStatus == CifsGood) || (ses->server->tcpStatus == CifsNew))) { @@ -485,7 +485,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, } } else { wait_event(ses->server->response_q, - (!(midQ->midState & MID_REQUEST_SUBMITTED)) || + (!(midQ->midState == MID_REQUEST_SUBMITTED)) || ((ses->server->tcpStatus != CifsGood) && (ses->server->tcpStatus != CifsNew))); } @@ -749,13 +749,13 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, for (;;) { curr_timeout = timeout + jiffies; wait_event(ses->server->response_q, - (!(midQ->midState & MID_REQUEST_SUBMITTED)) || + (!(midQ->midState == MID_REQUEST_SUBMITTED)) || time_after(jiffies, curr_timeout) || ((ses->server->tcpStatus != CifsGood) && (ses->server->tcpStatus != CifsNew))); if (time_after(jiffies, curr_timeout) && - (midQ->midState & MID_REQUEST_SUBMITTED) && + (midQ->midState == MID_REQUEST_SUBMITTED) && ((ses->server->tcpStatus == CifsGood) || (ses->server->tcpStatus == CifsNew))) { @@ -780,7 +780,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, } } else { wait_event(ses->server->response_q, - (!(midQ->midState & MID_REQUEST_SUBMITTED)) || + (!(midQ->midState == MID_REQUEST_SUBMITTED)) || ((ses->server->tcpStatus != CifsGood) && (ses->server->tcpStatus != CifsNew))); } |