diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-02-17 09:09:12 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-03-21 12:27:35 -0400 |
commit | fc40f9cf828908e91d9af820e9300a9d42fbbd72 (patch) | |
tree | 1d0aa12f099ea9c759321d5e75967e152fcf4b11 /fs/cifs/cifssmb.c | |
parent | 1daaae8fa4afe3df78ca34e724ed7e8187e4eb32 (diff) |
CIFS: Simplify inFlight logic
by making it as unsigned integer and surround access with req_lock
from server structure.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index cd66b76e3282..d7cbcfa21a0c 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -721,7 +721,7 @@ cifs_echo_callback(struct mid_q_entry *mid) | |||
721 | struct TCP_Server_Info *server = mid->callback_data; | 721 | struct TCP_Server_Info *server = mid->callback_data; |
722 | 722 | ||
723 | DeleteMidQEntry(mid); | 723 | DeleteMidQEntry(mid); |
724 | atomic_dec(&server->inFlight); | 724 | dec_in_flight(server); |
725 | wake_up(&server->request_q); | 725 | wake_up(&server->request_q); |
726 | } | 726 | } |
727 | 727 | ||
@@ -1674,7 +1674,7 @@ cifs_readv_callback(struct mid_q_entry *mid) | |||
1674 | 1674 | ||
1675 | queue_work(system_nrt_wq, &rdata->work); | 1675 | queue_work(system_nrt_wq, &rdata->work); |
1676 | DeleteMidQEntry(mid); | 1676 | DeleteMidQEntry(mid); |
1677 | atomic_dec(&server->inFlight); | 1677 | dec_in_flight(server); |
1678 | wake_up(&server->request_q); | 1678 | wake_up(&server->request_q); |
1679 | } | 1679 | } |
1680 | 1680 | ||
@@ -2115,7 +2115,7 @@ cifs_writev_callback(struct mid_q_entry *mid) | |||
2115 | 2115 | ||
2116 | queue_work(system_nrt_wq, &wdata->work); | 2116 | queue_work(system_nrt_wq, &wdata->work); |
2117 | DeleteMidQEntry(mid); | 2117 | DeleteMidQEntry(mid); |
2118 | atomic_dec(&tcon->ses->server->inFlight); | 2118 | dec_in_flight(tcon->ses->server); |
2119 | wake_up(&tcon->ses->server->request_q); | 2119 | wake_up(&tcon->ses->server->request_q); |
2120 | } | 2120 | } |
2121 | 2121 | ||