Whamcloud - gitweb
LU-9010 ptlrpc: Change static defines to use macro for gss_svc_upcall.c 34/33934/3
authorArshad Hussain <arshad.super@gmail.com>
Fri, 28 Dec 2018 03:39:53 +0000 (22:39 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Jan 2019 06:18:00 +0000 (06:18 +0000)
This patch replaces spinlock which are defined statically
in file lustre/ptlrpc/gss/gss_svc_upcall.c with kernel
provided macro.

Signed-off-by: Arshad Hussain <arshad.super@gmail.com>
Change-Id: I9978fcf50763df1b908c41377eef89ce284cf835
Reviewed-on: https://review.whamcloud.com/33934
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/gss/gss_svc_upcall.c

index a00b541..1789649 100644 (file)
@@ -71,7 +71,7 @@
 
 #define GSS_SVC_UPCALL_TIMEOUT  (20)
 
-static spinlock_t __ctx_index_lock;
+static DEFINE_SPINLOCK(__ctx_index_lock);
 static __u64 __ctx_index;
 
 __u64 gss_get_next_ctx_index(void)
@@ -1161,7 +1161,6 @@ int __init gss_init_svc_upcall(void)
 {
        int     i, rc;
 
-       spin_lock_init(&__ctx_index_lock);
        /*
         * this helps reducing context index confliction. after server reboot,
         * conflicting request from clients might be filtered out by initial