diff options
author | Matthias Kaehlcke <matthias.kaehlcke@gmail.com> | 2007-09-19 01:46:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-19 14:24:18 -0400 |
commit | d8a4821dca693867a7953104c1e3cc830eb9191f (patch) | |
tree | 6329a8668b15d890101dd96155308e2ec3372259 /kernel | |
parent | ef2b02d3e617cb0400eedf2668f86215e1b0e6af (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.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/user.c b/kernel/user.c index e7d11cef6998..e080ba863ae3 100644 --- a/kernel/user.c +++ b/kernel/user.c | |||
@@ -67,13 +67,9 @@ static inline void uid_hash_remove(struct user_struct *up) | |||
67 | 67 | ||
68 | static inline struct user_struct *uid_hash_find(uid_t uid, struct list_head *hashent) | 68 | static inline struct user_struct *uid_hash_find(uid_t uid, struct list_head *hashent) |
69 | { | 69 | { |
70 | struct list_head *up; | 70 | struct user_struct *user; |
71 | |||
72 | list_for_each(up, hashent) { | ||
73 | struct user_struct *user; | ||
74 | |||
75 | user = list_entry(up, struct user_struct, uidhash_list); | ||
76 | 71 | ||
72 | list_for_each_entry(user, hashent, uidhash_list) { | ||
77 | if(user->uid == uid) { | 73 | if(user->uid == uid) { |
78 | atomic_inc(&user->__count); | 74 | atomic_inc(&user->__count); |
79 | return user; | 75 | return user; |