summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilov@microsoft.com>2019-01-16 22:22:29 +0300
committerSteve French <stfrench@microsoft.com>2019-03-06 03:10:01 +0300
commit34f4deb7c56c6fdc77a7e414203f0045bb6db32b (patch)
treefccaedae956555872001adad932ac8a4a1da99ea /fs/cifs/cifsglob.h
parent335b7b62ffb69d18055f2bb6f3a029263a07c735 (diff)
downloadlinux-34f4deb7c56c6fdc77a7e414203f0045bb6db32b.tar.xz
CIFS: Respect reconnect in non-MTU credits calculations
Every time after a session reconnect we don't need to account for credits obtained in previous sessions. Make use of the recently added cifs_credits structure to properly calculate credits for non-MTU requests the same way we did for MTU ones. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 4293b1f13f00..84ce388de89d 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -741,12 +741,10 @@ has_credits(struct TCP_Server_Info *server, int *credits)
}
static inline void
-add_credits(struct TCP_Server_Info *server, const unsigned int add,
+add_credits(struct TCP_Server_Info *server, const struct cifs_credits *credits,
const int optype)
{
- struct cifs_credits credits = { .value = add, .instance = 0 };
-
- server->ops->add_credits(server, &credits, optype);
+ server->ops->add_credits(server, credits, optype);
}
static inline void