X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fgss%2Fgss_internal.h;h=39c2e8dbb3ed65142bd83d83d4fdd7ccc03aad14;hb=cda353e6efae5013a26aedbe49d8aa6fb8fe456e;hp=3a7a9d0891b02cc1dbde8b7c96ac0ffc6320d069;hpb=218fc688c11f081881b2cc1c1632ceaf9ec77a77;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/gss/gss_internal.h b/lustre/ptlrpc/gss/gss_internal.h index 3a7a9d0..39c2e8d 100644 --- a/lustre/ptlrpc/gss/gss_internal.h +++ b/lustre/ptlrpc/gss/gss_internal.h @@ -287,9 +287,9 @@ struct gss_cli_ctx { }; struct gss_cli_ctx_keyring { - struct gss_cli_ctx gck_base; - struct key *gck_key; - struct timer_list *gck_timer; + struct gss_cli_ctx gck_base; + struct key *gck_key; + struct timer_list gck_timer; }; struct gss_sec { @@ -358,6 +358,14 @@ static inline struct gss_sec_keyring *sec2gsec_keyring(struct ptlrpc_sec *sec) return container_of(sec2gsec(sec), struct gss_sec_keyring, gsk_base); } +#ifdef HAVE_CACHE_HASH_SPINLOCK +# define sunrpc_cache_lookup(c, i, h) sunrpc_cache_lookup_rcu((c), (i), (h)) +# define cache_read_lock(cdetail) spin_lock(&((cdetail)->hash_lock)) +# define cache_read_unlock(cdetail) spin_unlock(&((cdetail)->hash_lock)) +#else /* ! HAVE_CACHE_HASH_SPINLOCK */ +# define cache_read_lock(cdetail) read_lock(&((cdetail)->hash_lock)) +# define cache_read_unlock(cdetail) read_unlock(&((cdetail)->hash_lock)) +#endif #define GSS_CTX_INIT_MAX_LEN (1024)