X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Fsec.c;h=2aab7495e1491fa72e752de4489b8ec6a94507b3;hp=5c24c6cc607fef7c9bc863d9706aa40eed5171d8;hb=b11d0d89b22e8409cac12129a80044f84df0023c;hpb=a56b6687b68421b032b333c1e95a45950f7b625c diff --git a/lustre/ptlrpc/sec.c b/lustre/ptlrpc/sec.c index 5c24c6c..2aab749 100644 --- a/lustre/ptlrpc/sec.c +++ b/lustre/ptlrpc/sec.c @@ -105,7 +105,9 @@ EXPORT_SYMBOL(sptlrpc_unregister_policy); static struct ptlrpc_sec_policy * sptlrpc_flavor2policy(ptlrpc_sec_flavor_t flavor) { +#ifdef CONFIG_KMOD static DECLARE_MUTEX(load_mutex); +#endif static atomic_t loaded = ATOMIC_INIT(0); struct ptlrpc_sec_policy *policy; __u32 number = SEC_FLAVOR_POLICY(flavor), flag = 0; @@ -113,7 +115,9 @@ struct ptlrpc_sec_policy * sptlrpc_flavor2policy(ptlrpc_sec_flavor_t flavor) if (number >= SPTLRPC_POLICY_MAX) return NULL; +#ifdef CONFIG_KMOD again: +#endif read_lock(&policy_lock); policy = policies[number]; if (policy && !try_module_get(policy->sp_owner))