From 8c9a8a0d451cbc7c76e96e8e501f98b169726f53 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Thu, 27 Dec 2018 22:39:53 -0500 Subject: [PATCH] LU-9010 ptlrpc: Change static defines to use macro for gss_svc_upcall.c 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 Change-Id: I9978fcf50763df1b908c41377eef89ce284cf835 Reviewed-on: https://review.whamcloud.com/33934 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/ptlrpc/gss/gss_svc_upcall.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c index a00b541..1789649 100644 --- a/lustre/ptlrpc/gss/gss_svc_upcall.c +++ b/lustre/ptlrpc/gss/gss_svc_upcall.c @@ -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 -- 1.8.3.1