From 4bf16bd34fac455ebc02a76f24c485b650908cd2 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Mon, 20 Jan 2014 10:04:00 +0100 Subject: [PATCH] use uid_eq() --- namespace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/namespace.c b/namespace.c index 1f84744..828e8f5 100644 --- a/namespace.c +++ b/namespace.c @@ -399,8 +399,8 @@ struct kdbus_ns_user *kdbus_ns_user_ref(struct kdbus_ns *ns, kuid_t uid) /* find uid and reference it */ mutex_lock(&ns->lock); - hash_for_each_possible(ns->user_hash, u, hentry, uid) { - if (u->uid != uid) + hash_for_each_possible(ns->user_hash, u, hentry, __kuid_val(uid)) { + if (!uid_eq(u->uid, uid)) continue; kref_get(&u->kref); @@ -422,7 +422,7 @@ struct kdbus_ns_user *kdbus_ns_user_ref(struct kdbus_ns *ns, kuid_t uid) /* link into namespace */ mutex_lock(&ns->lock); - hash_add(ns->user_hash, &u->hentry, u->uid); + hash_add(ns->user_hash, &u->hentry, __kuid_val(u->uid)); mutex_unlock(&ns->lock); return u; -- 2.34.1