diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-03-15 10:22:27 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-03-21 16:35:36 (GMT) |
commit | bc205ed19bdb56576b291830bc3f752aef5e3923 (patch) | |
tree | abdda57d027c601d40027572b2d070b9432670a2 /fs/cifs/cifsglob.h | |
parent | 5bc594982f49220d33e927e3c9e028bf87b4745c (diff) | |
download | linux-fsl-qoriq-bc205ed19bdb56576b291830bc3f752aef5e3923.tar.xz |
CIFS: Prepare credits code for a slot reservation
that is essential for CIFS/SMB/SMB2 oplock breaks and SMB2 echos.
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/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index d55de96..2309a67 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -315,12 +315,22 @@ in_flight(struct TCP_Server_Info *server) return num; } +static inline int* +get_credits_field(struct TCP_Server_Info *server) +{ + /* + * This will change to switch statement when we reserve slots for echos + * and oplock breaks. + */ + return &server->credits; +} + static inline bool -has_credits(struct TCP_Server_Info *server) +has_credits(struct TCP_Server_Info *server, int *credits) { int num; spin_lock(&server->req_lock); - num = server->credits; + num = *credits; spin_unlock(&server->req_lock); return num > 0; } |