Commit d8a4821d authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds

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: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ef2b02d3
...@@ -67,13 +67,9 @@ static inline void uid_hash_remove(struct user_struct *up) ...@@ -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) static inline struct user_struct *uid_hash_find(uid_t uid, struct list_head *hashent)
{ {
struct list_head *up; struct user_struct *user;
list_for_each(up, hashent) {
struct user_struct *user;
user = list_entry(up, struct user_struct, uidhash_list);
list_for_each_entry(user, hashent, uidhash_list) {
if(user->uid == uid) { if(user->uid == uid) {
atomic_inc(&user->__count); atomic_inc(&user->__count);
return user; return user;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment