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>
This commit is contained in:
@@ -83,7 +83,7 @@ struct autofs_info {
|
||||
struct autofs_wait_queue {
|
||||
wait_queue_head_t queue;
|
||||
struct autofs_wait_queue *next;
|
||||
autofs_wqt_t wait_queue_token;
|
||||
autofs_wqt_t wait_queue_entry_token;
|
||||
/* We use the following to see what we are waiting for */
|
||||
struct qstr name;
|
||||
u32 dev;
|
||||
|
@@ -104,7 +104,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
||||
size_t pktsz;
|
||||
|
||||
pr_debug("wait id = 0x%08lx, name = %.*s, type=%d\n",
|
||||
(unsigned long) wq->wait_queue_token,
|
||||
(unsigned long) wq->wait_queue_entry_token,
|
||||
wq->name.len, wq->name.name, type);
|
||||
|
||||
memset(&pkt, 0, sizeof(pkt)); /* For security reasons */
|
||||
@@ -120,7 +120,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
||||
|
||||
pktsz = sizeof(*mp);
|
||||
|
||||
mp->wait_queue_token = wq->wait_queue_token;
|
||||
mp->wait_queue_entry_token = wq->wait_queue_entry_token;
|
||||
mp->len = wq->name.len;
|
||||
memcpy(mp->name, wq->name.name, wq->name.len);
|
||||
mp->name[wq->name.len] = '\0';
|
||||
@@ -133,7 +133,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
||||
|
||||
pktsz = sizeof(*ep);
|
||||
|
||||
ep->wait_queue_token = wq->wait_queue_token;
|
||||
ep->wait_queue_entry_token = wq->wait_queue_entry_token;
|
||||
ep->len = wq->name.len;
|
||||
memcpy(ep->name, wq->name.name, wq->name.len);
|
||||
ep->name[wq->name.len] = '\0';
|
||||
@@ -153,7 +153,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
|
||||
|
||||
pktsz = sizeof(*packet);
|
||||
|
||||
packet->wait_queue_token = wq->wait_queue_token;
|
||||
packet->wait_queue_entry_token = wq->wait_queue_entry_token;
|
||||
packet->len = wq->name.len;
|
||||
memcpy(packet->name, wq->name.name, wq->name.len);
|
||||
packet->name[wq->name.len] = '\0';
|
||||
@@ -428,7 +428,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
wq->wait_queue_token = autofs4_next_wait_queue;
|
||||
wq->wait_queue_entry_token = autofs4_next_wait_queue;
|
||||
if (++autofs4_next_wait_queue == 0)
|
||||
autofs4_next_wait_queue = 1;
|
||||
wq->next = sbi->queues;
|
||||
@@ -461,7 +461,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
|
||||
}
|
||||
|
||||
pr_debug("new wait id = 0x%08lx, name = %.*s, nfy=%d\n",
|
||||
(unsigned long) wq->wait_queue_token, wq->name.len,
|
||||
(unsigned long) wq->wait_queue_entry_token, wq->name.len,
|
||||
wq->name.name, notify);
|
||||
|
||||
/*
|
||||
@@ -471,7 +471,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
|
||||
} else {
|
||||
wq->wait_ctr++;
|
||||
pr_debug("existing wait id = 0x%08lx, name = %.*s, nfy=%d\n",
|
||||
(unsigned long) wq->wait_queue_token, wq->name.len,
|
||||
(unsigned long) wq->wait_queue_entry_token, wq->name.len,
|
||||
wq->name.name, notify);
|
||||
mutex_unlock(&sbi->wq_mutex);
|
||||
kfree(qstr.name);
|
||||
@@ -550,13 +550,13 @@ int autofs4_wait(struct autofs_sb_info *sbi,
|
||||
}
|
||||
|
||||
|
||||
int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_token, int status)
|
||||
int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_entry_token, int status)
|
||||
{
|
||||
struct autofs_wait_queue *wq, **wql;
|
||||
|
||||
mutex_lock(&sbi->wq_mutex);
|
||||
for (wql = &sbi->queues; (wq = *wql) != NULL; wql = &wq->next) {
|
||||
if (wq->wait_queue_token == wait_queue_token)
|
||||
if (wq->wait_queue_entry_token == wait_queue_entry_token)
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user