From: Matthias Kaehlcke Date: Wed, 19 Sep 2007 05:46:43 +0000 (-0700) Subject: kernel/user.c: Use list_for_each_entry instead of list_for_each X-Git-Tag: v2.6.23-rc7~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8a4821dca693867a7953104c1e3cc830eb9191f;p=linux-2.6 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/user.c b/kernel/user.c index e7d11cef69..e080ba863a 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -67,13 +67,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;