- cfs_hlist_head_t *head;
- struct ll_remote_perm *lrp;
- cfs_hlist_node_t *node;
- int found = 0, rc;
- ENTRY;
-
- if (!lli->lli_remote_perms)
- RETURN(-ENOENT);
-
- head = lli->lli_remote_perms + remote_perm_hashfunc(current->uid);
-
- cfs_spin_lock(&lli->lli_lock);
- cfs_hlist_for_each_entry(lrp, node, head, lrp_list) {
- if (lrp->lrp_uid != current->uid)
- continue;
- if (lrp->lrp_gid != current->gid)
- continue;
- if (lrp->lrp_fsuid != current->fsuid)
- continue;
- if (lrp->lrp_fsgid != current->fsgid)
- continue;
- found = 1;
- break;
- }
+ struct hlist_head *head;
+ struct ll_remote_perm *lrp;
+ struct hlist_node __maybe_unused *node;
+ int found = 0, rc;
+ ENTRY;
+
+ if (!lli->lli_remote_perms)
+ RETURN(-ENOENT);
+
+ head = lli->lli_remote_perms +
+ remote_perm_hashfunc(from_kuid(&init_user_ns, current_uid()));
+
+ spin_lock(&lli->lli_lock);
+ cfs_hlist_for_each_entry(lrp, node, head, lrp_list) {
+ if (lrp->lrp_uid != from_kuid(&init_user_ns, current_uid()))
+ continue;
+ if (lrp->lrp_gid != from_kgid(&init_user_ns, current_gid()))
+ continue;
+ if (lrp->lrp_fsuid != from_kuid(&init_user_ns, current_fsuid()))
+ continue;
+ if (lrp->lrp_fsgid != from_kgid(&init_user_ns, current_fsgid()))
+ continue;
+ found = 1;
+ break;
+ }