NULL, /* others can be loadable modules */
};
-u32
+static u32
pseudoflavor_to_flavor(u32 flavor) {
if (flavor >= RPC_AUTH_MAXFLAVOR)
return RPC_AUTH_GSS;
kfree(auth);
}
-static spinlock_t rpc_credcache_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rpc_credcache_lock);
/*
* Initialize RPC credential cache
list_for_each_safe(pos, next, &auth->au_credcache[nr]) {
struct rpc_cred *entry;
entry = list_entry(pos, struct rpc_cred, cr_hash);
- if (entry->cr_flags & RPCAUTH_CRED_DEAD)
- continue;
if (rpcauth_prune_expired(entry, &free))
continue;
if (entry->cr_ops->crmatch(acred, entry, taskflags)) {
get_group_info(current->group_info);
acred.uid = current->fsuid;
acred.gid = current->fsgid;
- acred.xid = current->xid;
+ acred.xid = vx_current_xid();
acred.group_info = current->group_info;
dprintk("RPC: looking up %s cred\n",
get_group_info(current->group_info);
acred.uid = current->fsuid;
acred.gid = current->fsgid;
- acred.xid = current->xid;
+ acred.xid = vx_current_xid();
acred.group_info = current->group_info;
dprintk("RPC: %4d looking up %s cred\n",
if (!atomic_dec_and_lock(&cred->cr_count, &rpc_credcache_lock))
return;
- if ((cred->cr_flags & RPCAUTH_CRED_DEAD) && !list_empty(&cred->cr_hash))
- list_del_init(&cred->cr_hash);
-
if (list_empty(&cred->cr_hash)) {
spin_unlock(&rpc_credcache_lock);
rpcauth_crdestroy(cred);
return !(task->tk_msg.rpc_cred) ||
(task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_UPTODATE);
}
-
-int
-rpcauth_deadcred(struct rpc_task *task)
-{
- return !(task->tk_msg.rpc_cred) ||
- (task->tk_msg.rpc_cred->cr_flags & RPCAUTH_CRED_DEAD);
-}