aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/misc.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-05-17 09:53:29 -0400
committerPavel Shilovsky <pshilovsky@samba.org>2012-05-23 04:33:12 -0400
commit452757897a311b939ae202744754ffd9ce6704d8 (patch)
tree29f14cb0476af25d2bcd10883e0d612711462f29 /fs/cifs/misc.c
parent8aa26f3ed80ddbaf78804b6481fcfdbd447caa1c (diff)
CIFS: Move add/set_credits and get_credits_field to ops structure
Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> 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/misc.c')
-rw-r--r--fs/cifs/misc.c19
1 files changed, 0 insertions, 19 deletions
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)
653 653
654 return false; 654 return false;
655} 655}
656
657void
658cifs_add_credits(struct TCP_Server_Info *server, const unsigned int add)
659{
660 spin_lock(&server->req_lock);
661 server->credits += add;
662 server->in_flight--;
663 spin_unlock(&server->req_lock);
664 wake_up(&server->request_q);
665}
666
667void
668cifs_set_credits(struct TCP_Server_Info *server, const int val)
669{
670 spin_lock(&server->req_lock);
671 server->credits = val;
672 server->oplocks = val > 1 ? enable_oplocks : false;
673 spin_unlock(&server->req_lock);
674}