From 452757897a311b939ae202744754ffd9ce6704d8 Mon Sep 17 00:00:00 2001 From: Pavel Shilovsky Date: Thu, 17 May 2012 17:53:29 +0400 Subject: CIFS: Move add/set_credits and get_credits_field to ops structure Acked-by: Shirish Pargaonkar Reviewed-by: Jeff Layton Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French --- fs/cifs/misc.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'fs/cifs/misc.c') diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index d2bb1e75ee96..e2552d2b2e42 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c @@ -653,22 +653,3 @@ backup_cred(struct cifs_sb_info *cifs_sb) return false; } - -void -cifs_add_credits(struct TCP_Server_Info *server, const unsigned int add) -{ - spin_lock(&server->req_lock); - server->credits += add; - server->in_flight--; - spin_unlock(&server->req_lock); - wake_up(&server->request_q); -} - -void -cifs_set_credits(struct TCP_Server_Info *server, const int val) -{ - spin_lock(&server->req_lock); - server->credits = val; - server->oplocks = val > 1 ? enable_oplocks : false; - spin_unlock(&server->req_lock); -} -- cgit v1.2.3-58-ga151