]> Pileus Git - ~andy/linux/blobdiff - net/sunrpc/auth.c
hlist: drop the node parameter from iterators
[~andy/linux] / net / sunrpc / auth.c
index b5c067bccc4595204f21bff24bbf16631e54cad4..f5294047df77b03b0feae953405bfd5b41252b76 100644 (file)
@@ -407,15 +407,14 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
 {
        LIST_HEAD(free);
        struct rpc_cred_cache *cache = auth->au_credcache;
-       struct hlist_node *pos;
        struct rpc_cred *cred = NULL,
                        *entry, *new;
        unsigned int nr;
 
-       nr = hash_long(acred->uid, cache->hashbits);
+       nr = hash_long(from_kuid(&init_user_ns, acred->uid), cache->hashbits);
 
        rcu_read_lock();
-       hlist_for_each_entry_rcu(entry, pos, &cache->hashtable[nr], cr_hash) {
+       hlist_for_each_entry_rcu(entry, &cache->hashtable[nr], cr_hash) {
                if (!entry->cr_ops->crmatch(acred, entry, flags))
                        continue;
                spin_lock(&cache->lock);
@@ -439,7 +438,7 @@ rpcauth_lookup_credcache(struct rpc_auth *auth, struct auth_cred * acred,
        }
 
        spin_lock(&cache->lock);
-       hlist_for_each_entry(entry, pos, &cache->hashtable[nr], cr_hash) {
+       hlist_for_each_entry(entry, &cache->hashtable[nr], cr_hash) {
                if (!entry->cr_ops->crmatch(acred, entry, flags))
                        continue;
                cred = get_rpccred(entry);
@@ -519,8 +518,8 @@ rpcauth_bind_root_cred(struct rpc_task *task, int lookupflags)
 {
        struct rpc_auth *auth = task->tk_client->cl_auth;
        struct auth_cred acred = {
-               .uid = 0,
-               .gid = 0,
+               .uid = GLOBAL_ROOT_UID,
+               .gid = GLOBAL_ROOT_GID,
        };
 
        dprintk("RPC: %5u looking up %s cred\n",