sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming
So I've noticed a number of instances where it was not obvious from the code whether ->task_list was for a wait-queue head or a wait-queue entry. Furthermore, there's a number of wait-queue users where the lists are not for 'tasks' but other entities (poll tables, etc.), in which case the 'task_list' name is actively confusing. To clear this all up, name the wait-queue head and entry list structure fields unambiguously: struct wait_queue_head::task_list => ::head struct wait_queue_entry::task_list => ::entry For example, this code: rqw->wait.task_list.next != &wait->task_list ... is was pretty unclear (to me) what it's doing, while now it's written this way: rqw->wait.head.next != &wait->entry ... which makes it pretty clear that we are iterating a list until we see the head. Other examples are: list_for_each_entry_safe(pos, next, &x->task_list, task_list) { list_for_each_entry(wq, &fence->wait.task_list, task_list)...
Showing
- block/blk-mq.c 1 addition, 1 deletionblock/blk-mq.c
- block/blk-wbt.c 1 addition, 1 deletionblock/blk-wbt.c
- block/kyber-iosched.c 4 additions, 4 deletionsblock/kyber-iosched.c
- drivers/gpu/drm/i915/i915_sw_fence.c 10 additions, 11 deletionsdrivers/gpu/drm/i915/i915_sw_fence.c
- drivers/rtc/rtc-imxdi.c 1 addition, 1 deletiondrivers/rtc/rtc-imxdi.c
- fs/cachefiles/rdwr.c 1 addition, 1 deletionfs/cachefiles/rdwr.c
- fs/eventpoll.c 1 addition, 1 deletionfs/eventpoll.c
- fs/fs_pin.c 1 addition, 1 deletionfs/fs_pin.c
- fs/nilfs2/segment.c 1 addition, 2 deletionsfs/nilfs2/segment.c
- fs/orangefs/orangefs-bufmap.c 4 additions, 4 deletionsfs/orangefs/orangefs-bufmap.c
- fs/userfaultfd.c 11 additions, 11 deletionsfs/userfaultfd.c
- include/linux/wait.h 10 additions, 10 deletionsinclude/linux/wait.h
- include/linux/wait_bit.h 2 additions, 2 deletionsinclude/linux/wait_bit.h
- kernel/sched/wait.c 12 additions, 12 deletionskernel/sched/wait.c
- kernel/sched/wait_bit.c 2 additions, 2 deletionskernel/sched/wait_bit.c
- mm/filemap.c 1 addition, 1 deletionmm/filemap.c
- mm/memcontrol.c 1 addition, 1 deletionmm/memcontrol.c
- mm/shmem.c 2 additions, 2 deletionsmm/shmem.c
Please register or sign in to comment