mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
ef2b02d3e6
commit
d8a4821dca
1 changed files with 2 additions and 6 deletions
|
@ -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);
|
||||
|
||||
list_for_each_entry(user, hashent, uidhash_list) {
|
||||
if(user->uid == uid) {
|
||||
atomic_inc(&user->__count);
|
||||
return user;
|
||||
|
|
Loading…
Reference in a new issue