[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070722185247.GI27415@traven>
Date: Sun, 22 Jul 2007 20:52:47 +0200
From: Matthias Kaehlcke <matthias.kaehlcke@...il.com>
To: torvalds@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: [PATCH 3/5] kernel/user.c: Use list_for_each_entry instead of list_for_each
kernel/user.c: Convert list_for_each to list_for_each_entry in
uid_hash_find()
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@...il.com>
--
diff --git a/kernel/user.c b/kernel/user.c
index 4869563..d0363d1 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -68,13 +68,9 @@ static inline void uid_hash_remove(struct user_struct *up)
static inline struct user_struct *uid_hash_find(uid_t uid, struct list_head *hashent)
{
- struct list_head *up;
-
- list_for_each(up, hashent) {
- struct user_struct *user;
-
- user = list_entry(up, struct user_struct, uidhash_list);
+ struct user_struct *user;
+ list_for_each_entry(user, hashent, uidhash_list) {
if(user->uid == uid) {
atomic_inc(&user->__count);
return user;
--
Matthias Kaehlcke
Linux Application Developer
Barcelona
Usually when people are sad, they don't do anything. They just cry over
their condition. But when they get angry, they bring about a change
(Malcolm X)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists