diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-06-20 06:06:13 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-06-20 06:18:27 -0400 |
| commit | ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f (patch) | |
| tree | a9312337219777a9d3fb65d4673bbc6b5eeacd9c /mm | |
| parent | 9705596d08ac87c18aee32cc97f2783b7d14624e (diff) | |
sched/wait: Rename wait_queue_t => wait_queue_entry_t
Rename:
wait_queue_t => wait_queue_entry_t
'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
which had to carry the name.
Start sorting this out by renaming it to 'wait_queue_entry_t'.
This also allows the real structure name 'struct __wait_queue' to
lose its double underscore and become 'struct wait_queue_entry',
which is the more canonical nomenclature for such data types.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/filemap.c | 10 | ||||
| -rw-r--r-- | mm/memcontrol.c | 8 | ||||
| -rw-r--r-- | mm/mempool.c | 2 | ||||
| -rw-r--r-- | mm/shmem.c | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 6f1be573a5e6..80c19ee81e95 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
| @@ -768,10 +768,10 @@ struct wait_page_key { | |||
| 768 | struct wait_page_queue { | 768 | struct wait_page_queue { |
| 769 | struct page *page; | 769 | struct page *page; |
| 770 | int bit_nr; | 770 | int bit_nr; |
| 771 | wait_queue_t wait; | 771 | wait_queue_entry_t wait; |
| 772 | }; | 772 | }; |
| 773 | 773 | ||
| 774 | static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void *arg) | 774 | static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg) |
| 775 | { | 775 | { |
| 776 | struct wait_page_key *key = arg; | 776 | struct wait_page_key *key = arg; |
| 777 | struct wait_page_queue *wait_page | 777 | struct wait_page_queue *wait_page |
| @@ -834,7 +834,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q, | |||
| 834 | struct page *page, int bit_nr, int state, bool lock) | 834 | struct page *page, int bit_nr, int state, bool lock) |
| 835 | { | 835 | { |
| 836 | struct wait_page_queue wait_page; | 836 | struct wait_page_queue wait_page; |
| 837 | wait_queue_t *wait = &wait_page.wait; | 837 | wait_queue_entry_t *wait = &wait_page.wait; |
| 838 | int ret = 0; | 838 | int ret = 0; |
| 839 | 839 | ||
| 840 | init_wait(wait); | 840 | init_wait(wait); |
| @@ -847,7 +847,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q, | |||
| 847 | 847 | ||
| 848 | if (likely(list_empty(&wait->task_list))) { | 848 | if (likely(list_empty(&wait->task_list))) { |
| 849 | if (lock) | 849 | if (lock) |
| 850 | __add_wait_queue_tail_exclusive(q, wait); | 850 | __add_wait_queue_entry_tail_exclusive(q, wait); |
| 851 | else | 851 | else |
| 852 | __add_wait_queue(q, wait); | 852 | __add_wait_queue(q, wait); |
| 853 | SetPageWaiters(page); | 853 | SetPageWaiters(page); |
| @@ -907,7 +907,7 @@ int wait_on_page_bit_killable(struct page *page, int bit_nr) | |||
| 907 | * | 907 | * |
| 908 | * Add an arbitrary @waiter to the wait queue for the nominated @page. | 908 | * Add an arbitrary @waiter to the wait queue for the nominated @page. |
| 909 | */ | 909 | */ |
| 910 | void add_page_wait_queue(struct page *page, wait_queue_t *waiter) | 910 | void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter) |
| 911 | { | 911 | { |
| 912 | wait_queue_head_t *q = page_waitqueue(page); | 912 | wait_queue_head_t *q = page_waitqueue(page); |
| 913 | unsigned long flags; | 913 | unsigned long flags; |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 94172089f52f..9a90b096dc6b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -170,7 +170,7 @@ struct mem_cgroup_event { | |||
| 170 | */ | 170 | */ |
| 171 | poll_table pt; | 171 | poll_table pt; |
| 172 | wait_queue_head_t *wqh; | 172 | wait_queue_head_t *wqh; |
| 173 | wait_queue_t wait; | 173 | wait_queue_entry_t wait; |
| 174 | struct work_struct remove; | 174 | struct work_struct remove; |
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| @@ -1479,10 +1479,10 @@ static DECLARE_WAIT_QUEUE_HEAD(memcg_oom_waitq); | |||
| 1479 | 1479 | ||
| 1480 | struct oom_wait_info { | 1480 | struct oom_wait_info { |
| 1481 | struct mem_cgroup *memcg; | 1481 | struct mem_cgroup *memcg; |
| 1482 | wait_queue_t wait; | 1482 | wait_queue_entry_t wait; |
| 1483 | }; | 1483 | }; |
| 1484 | 1484 | ||
| 1485 | static int memcg_oom_wake_function(wait_queue_t *wait, | 1485 | static int memcg_oom_wake_function(wait_queue_entry_t *wait, |
| 1486 | unsigned mode, int sync, void *arg) | 1486 | unsigned mode, int sync, void *arg) |
| 1487 | { | 1487 | { |
| 1488 | struct mem_cgroup *wake_memcg = (struct mem_cgroup *)arg; | 1488 | struct mem_cgroup *wake_memcg = (struct mem_cgroup *)arg; |
| @@ -3725,7 +3725,7 @@ static void memcg_event_remove(struct work_struct *work) | |||
| 3725 | * | 3725 | * |
| 3726 | * Called with wqh->lock held and interrupts disabled. | 3726 | * Called with wqh->lock held and interrupts disabled. |
| 3727 | */ | 3727 | */ |
| 3728 | static int memcg_event_wake(wait_queue_t *wait, unsigned mode, | 3728 | static int memcg_event_wake(wait_queue_entry_t *wait, unsigned mode, |
| 3729 | int sync, void *key) | 3729 | int sync, void *key) |
| 3730 | { | 3730 | { |
| 3731 | struct mem_cgroup_event *event = | 3731 | struct mem_cgroup_event *event = |
diff --git a/mm/mempool.c b/mm/mempool.c index 47a659dedd44..1c0294858527 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
| @@ -312,7 +312,7 @@ void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) | |||
| 312 | { | 312 | { |
| 313 | void *element; | 313 | void *element; |
| 314 | unsigned long flags; | 314 | unsigned long flags; |
| 315 | wait_queue_t wait; | 315 | wait_queue_entry_t wait; |
| 316 | gfp_t gfp_temp; | 316 | gfp_t gfp_temp; |
| 317 | 317 | ||
| 318 | VM_WARN_ON_ONCE(gfp_mask & __GFP_ZERO); | 318 | VM_WARN_ON_ONCE(gfp_mask & __GFP_ZERO); |
diff --git a/mm/shmem.c b/mm/shmem.c index e67d6ba4e98e..a6c7dece4660 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
| @@ -1902,7 +1902,7 @@ unlock: | |||
| 1902 | * entry unconditionally - even if something else had already woken the | 1902 | * entry unconditionally - even if something else had already woken the |
| 1903 | * target. | 1903 | * target. |
| 1904 | */ | 1904 | */ |
| 1905 | static int synchronous_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key) | 1905 | static int synchronous_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key) |
| 1906 | { | 1906 | { |
| 1907 | int ret = default_wake_function(wait, mode, sync, key); | 1907 | int ret = default_wake_function(wait, mode, sync, key); |
| 1908 | list_del_init(&wait->task_list); | 1908 | list_del_init(&wait->task_list); |
