aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-09-18 22:46:43 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-19 11:24:18 -0700
commitd8a4821dca693867a7953104c1e3cc830eb9191f (patch)
tree6329a8668b15d890101dd96155308e2ec3372259 /kernel
parentef2b02d3e617cb0400eedf2668f86215e1b0e6af (diff)
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@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/user.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/user.c b/kernel/user.c
index e7d11cef699..e080ba863ae 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;