Mel Gorman 60bfe9
From 3e17d8c613b12bc5effeeaa201a412846dff020e Mon Sep 17 00:00:00 2001
Mel Gorman 60bfe9
From: Mel Gorman <mgorman@suse.de>
Mel Gorman 60bfe9
Date: Wed, 30 Aug 2017 09:58:17 +0100
Mel Gorman 60bfe9
Subject: [PATCH] sched/wait: Rename wait_queue_t => wait_queue_entry_t
Mel Gorman 60bfe9
Mel Gorman 60bfe9
References: bnc#971975 VM performance -- page waitqueue
Mel Gorman 60bfe9
Patch-mainline: v4.13
Mel Gorman 60bfe9
Git-commit: ac6424b981bce1c4bc55675c6ce11bfe1bbfa64f
Mel Gorman 60bfe9
Mel Gorman 60bfe9
Rename:
Mel Gorman 60bfe9
Mel Gorman 60bfe9
	wait_queue_t		=>	wait_queue_entry_t
Mel Gorman 60bfe9
Mel Gorman 60bfe9
'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
Mel Gorman 60bfe9
but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
Mel Gorman 60bfe9
which had to carry the name.
Mel Gorman 60bfe9
Mel Gorman 60bfe9
Start sorting this out by renaming it to 'wait_queue_entry_t'.
Mel Gorman 60bfe9
Mel Gorman 60bfe9
This also allows the real structure name 'struct __wait_queue' to
Mel Gorman 60bfe9
lose its double underscore and become 'struct wait_queue_entry',
Mel Gorman 60bfe9
which is the more canonical nomenclature for such data types.
Mel Gorman 60bfe9
Mel Gorman 60bfe9
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Mel Gorman 60bfe9
Cc: Peter Zijlstra <peterz@infradead.org>
Mel Gorman 60bfe9
Cc: Thomas Gleixner <tglx@linutronix.de>
Mel Gorman 60bfe9
Cc: linux-kernel@vger.kernel.org
Mel Gorman 60bfe9
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Mel Gorman 60bfe9
Signed-off-by: Mel Gorman <mgorman@suse.de>
Mel Gorman 60bfe9
---
Michal Marek f1645f
 Documentation/DocBook/kernel-hacking.tmpl              |    2 
Michal Marek f1645f
 Documentation/filesystems/autofs4.txt                  |   12 +--
Michal Marek f1645f
 block/blk-mq.c                                         |    2 
Michal Marek f1645f
 block/blk-wbt.c                                        |    2 
Michal Marek f1645f
 block/kyber-iosched.c                                  |    8 +-
Michal Marek f1645f
 drivers/bluetooth/btmrvl_main.c                        |    2 
Michal Marek f1645f
 drivers/char/ipmi/ipmi_watchdog.c                      |    2 
Michal Marek f1645f
 drivers/gpu/drm/i915/i915_gem_request.h                |    2 
Michal Marek f1645f
 drivers/gpu/drm/i915/i915_sw_fence.c                   |   14 +--
Michal Marek f1645f
 drivers/gpu/drm/i915/i915_sw_fence.h                   |    2 
Michal Marek f1645f
 drivers/gpu/drm/radeon/radeon.h                        |    2 
Michal Marek f1645f
 drivers/gpu/drm/radeon/radeon_fence.c                  |    2 
Michal Marek f1645f
 drivers/gpu/vga/vgaarb.c                               |    2 
Michal Marek f1645f
 drivers/infiniband/hw/i40iw/i40iw_main.c               |    2 
Michal Marek f1645f
 drivers/md/bcache/btree.h                              |    2 
Michal Marek f1645f
 drivers/net/ethernet/cavium/liquidio/octeon_main.h     |    4 -
Michal Marek f1645f
 drivers/net/wireless/cisco/airo.c                      |    2 
Michal Marek f1645f
 drivers/net/wireless/intersil/hostap/hostap_ioctl.c    |    2 
Michal Marek f1645f
 drivers/net/wireless/marvell/libertas/main.c           |    2 
Michal Marek f1645f
 drivers/scsi/dpt/dpti_i2o.h                            |    2 
Michal Marek f1645f
 drivers/scsi/ips.c                                     |   12 +--
Michal Marek f1645f
 drivers/scsi/ips.h                                     |    4 -
Michal Marek f1645f
 drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |    6 -
Michal Marek f1645f
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c |    4 -
Michal Marek f1645f
 drivers/staging/lustre/lnet/libcfs/debug.c             |    2 
Michal Marek f1645f
 drivers/staging/lustre/lnet/libcfs/tracefile.c         |    2 
Michal Marek f1645f
 drivers/staging/lustre/lnet/lnet/lib-eq.c              |    2 
Michal Marek f1645f
 drivers/staging/lustre/lnet/lnet/lib-socket.c          |    2 
Michal Marek f1645f
 drivers/staging/lustre/lustre/fid/fid_request.c        |    6 -
Michal Marek f1645f
 drivers/staging/lustre/lustre/include/lustre_lib.h     |    4 -
Michal Marek f1645f
 drivers/staging/lustre/lustre/llite/lcommon_cl.c       |    2 
Michal Marek f1645f
 drivers/staging/lustre/lustre/lov/lov_cl_internal.h    |    2 
Michal Marek f1645f
 drivers/staging/lustre/lustre/lov/lov_object.c         |    2 
Michal Marek f1645f
 drivers/staging/lustre/lustre/obdclass/lu_object.c     |    6 -
Michal Marek f1645f
 drivers/tty/synclink_gt.c                              |    2 
Michal Marek f1645f
 drivers/vfio/virqfd.c                                  |    2 
Michal Marek f1645f
 drivers/vhost/vhost.c                                  |    2 
Michal Marek f1645f
 drivers/vhost/vhost.h                                  |    2 
Michal Marek f1645f
 fs/autofs4/autofs_i.h                                  |    2 
Michal Marek f1645f
 fs/autofs4/waitq.c                                     |   18 ++--
Michal Marek f1645f
 fs/cachefiles/internal.h                               |    2 
Michal Marek f1645f
 fs/cachefiles/namei.c                                  |    2 
Michal Marek f1645f
 fs/cachefiles/rdwr.c                                   |    2 
Michal Marek f1645f
 fs/dax.c                                               |    4 -
Michal Marek f1645f
 fs/eventfd.c                                           |    2 
Michal Marek f1645f
 fs/eventpoll.c                                         |   10 +-
Michal Marek f1645f
 fs/fs_pin.c                                            |    2 
Michal Marek f1645f
 fs/nfs/nfs4proc.c                                      |    4 -
Michal Marek f1645f
 fs/nilfs2/segment.c                                    |    2 
Michal Marek f1645f
 fs/orangefs/orangefs-bufmap.c                          |    4 -
Michal Marek f1645f
 fs/reiserfs/journal.c                                  |    2 
Michal Marek f1645f
 fs/select.c                                            |    4 -
Michal Marek f1645f
 fs/signalfd.c                                          |    2 
Michal Marek f1645f
 fs/userfaultfd.c                                       |    8 +-
Michal Marek f1645f
 include/linux/blk-mq.h                                 |    2 
Michal Marek f1645f
 include/linux/eventfd.h                                |    4 -
Michal Marek f1645f
 include/linux/kvm_irqfd.h                              |    2 
Michal Marek f1645f
 include/linux/pagemap.h                                |    2 
Michal Marek f1645f
 include/linux/poll.h                                   |    2 
Michal Marek f1645f
 include/linux/vfio.h                                   |    2 
Michal Marek f1645f
 include/linux/wait.h                                   |   67 ++++++++---------
Michal Marek f1645f
 include/net/af_unix.h                                  |    2 
Michal Marek f1645f
 include/uapi/linux/auto_fs.h                           |    4 -
Michal Marek f1645f
 include/uapi/linux/auto_fs4.h                          |    4 -
Michal Marek f1645f
 kernel/exit.c                                          |    4 -
Michal Marek f1645f
 kernel/futex.c                                         |    2 
Michal Marek f1645f
 kernel/sched/completion.c                              |    2 
Michal Marek f1645f
 kernel/sched/core.c                                    |    2 
Michal Marek f1645f
 kernel/sched/wait.c                                    |   42 +++++-----
Michal Marek f1645f
 kernel/workqueue.c                                     |    4 -
Michal Marek f1645f
 mm/filemap.c                                           |   10 +-
Michal Marek f1645f
 mm/memcontrol.c                                        |    8 +-
Michal Marek f1645f
 mm/mempool.c                                           |    2 
Michal Marek f1645f
 mm/shmem.c                                             |    2 
Michal Marek f1645f
 net/9p/trans_fd.c                                      |    4 -
Michal Marek f1645f
 net/bluetooth/hidp/core.c                              |    2 
Michal Marek f1645f
 net/core/datagram.c                                    |    2 
Michal Marek f1645f
 net/unix/af_unix.c                                     |    4 -
Michal Marek f1645f
 sound/core/control.c                                   |    2 
Michal Marek f1645f
 sound/core/hwdep.c                                     |    2 
Michal Marek f1645f
 sound/core/init.c                                      |    2 
Michal Marek f1645f
 sound/core/oss/pcm_oss.c                               |    4 -
Michal Marek f1645f
 sound/core/pcm_lib.c                                   |    2 
Michal Marek f1645f
 sound/core/pcm_native.c                                |    4 -
Michal Marek f1645f
 sound/core/rawmidi.c                                   |    8 +-
Michal Marek f1645f
 sound/core/seq/seq_fifo.c                              |    2 
Michal Marek f1645f
 sound/core/seq/seq_memory.c                            |    2 
Michal Marek f1645f
 sound/core/timer.c                                     |    2 
Michal Marek f1645f
 sound/isa/wavefront/wavefront_synth.c                  |    2 
Michal Marek f1645f
 sound/pci/mixart/mixart_core.c                         |    4 -
Michal Marek f1645f
 sound/pci/ymfpci/ymfpci_main.c                         |    2 
Michal Marek f1645f
 virt/kvm/eventfd.c                                     |    2 
Michal Marek f1645f
 92 files changed, 214 insertions(+), 211 deletions(-)
Mel Gorman 60bfe9
Mel Gorman 60bfe9
--- a/Documentation/DocBook/kernel-hacking.tmpl
Mel Gorman 60bfe9
+++ b/Documentation/DocBook/kernel-hacking.tmpl
Michal Marek f1645f
@@ -819,7 +819,7 @@ printk(KERN_INFO "my ip: %pI4\n", &i
Mel Gorman 60bfe9
    certain condition is true.  They must be used carefully to ensure
Mel Gorman 60bfe9
    there is no race condition.  You declare a
Mel Gorman 60bfe9
    <type>wait_queue_head_t</type>, and then processes which want to
Mel Gorman 60bfe9
-   wait for that condition declare a <type>wait_queue_t</type>
Mel Gorman 60bfe9
+   wait for that condition declare a <type>wait_queue_entry_t</type>
Mel Gorman 60bfe9
    referring to themselves, and place that in the queue.
Mel Gorman 60bfe9
   </para>
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/Documentation/filesystems/autofs4.txt
Mel Gorman 60bfe9
+++ b/Documentation/filesystems/autofs4.txt
Michal Marek f1645f
@@ -316,7 +316,7 @@ For version 5, the format of the message
Mel Gorman 60bfe9
         struct autofs_v5_packet {
Mel Gorman 60bfe9
                 int proto_version;                /* Protocol version */
Mel Gorman 60bfe9
                 int type;                        /* Type of packet */
Mel Gorman 60bfe9
-                autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+                autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
                 __u32 dev;
Mel Gorman 60bfe9
                 __u64 ino;
Mel Gorman 60bfe9
                 __u32 uid;
Michal Marek f1645f
@@ -341,12 +341,12 @@ The pipe will be set to "packet mode" (e
Mel Gorman 60bfe9
 `O_DIRECT`) to _pipe2(2)_ so that a read from the pipe will return at
Mel Gorman 60bfe9
 most one packet, and any unread portion of a packet will be discarded.
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-The `wait_queue_token` is a unique number which can identify a
Mel Gorman 60bfe9
+The `wait_queue_entry_token` is a unique number which can identify a
Mel Gorman 60bfe9
 particular request to be acknowledged.  When a message is sent over
Mel Gorman 60bfe9
 the pipe the affected dentry is marked as either "active" or
Mel Gorman 60bfe9
 "expiring" and other accesses to it block until the message is
Mel Gorman 60bfe9
 acknowledged using one of the ioctls below and the relevant
Mel Gorman 60bfe9
-`wait_queue_token`.
Mel Gorman 60bfe9
+`wait_queue_entry_token`.
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 Communicating with autofs: root directory ioctls
Mel Gorman 60bfe9
 ------------------------------------------------
Michal Marek f1645f
@@ -358,7 +358,7 @@ capability, or must be the automount dae
Mel Gorman 60bfe9
 The available ioctl commands are:
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 - **AUTOFS_IOC_READY**: a notification has been handled.  The argument
Mel Gorman 60bfe9
-    to the ioctl command is the "wait_queue_token" number
Mel Gorman 60bfe9
+    to the ioctl command is the "wait_queue_entry_token" number
Mel Gorman 60bfe9
     corresponding to the notification being acknowledged.
Mel Gorman 60bfe9
 - **AUTOFS_IOC_FAIL**: similar to above, but indicates failure with
Mel Gorman 60bfe9
     the error code `ENOENT`.
Michal Marek f1645f
@@ -382,14 +382,14 @@ The available ioctl commands are:
Mel Gorman 60bfe9
         struct autofs_packet_expire_multi {
Mel Gorman 60bfe9
                 int proto_version;              /* Protocol version */
Mel Gorman 60bfe9
                 int type;                       /* Type of packet */
Mel Gorman 60bfe9
-                autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+                autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
                 int len;
Mel Gorman 60bfe9
                 char name[NAME_MAX+1];
Mel Gorman 60bfe9
         };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
      is required.  This is filled in with the name of something
Mel Gorman 60bfe9
      that can be unmounted or removed.  If nothing can be expired,
Mel Gorman 60bfe9
-     `errno` is set to `EAGAIN`.  Even though a `wait_queue_token`
Mel Gorman 60bfe9
+     `errno` is set to `EAGAIN`.  Even though a `wait_queue_entry_token`
Mel Gorman 60bfe9
      is present in the structure, no "wait queue" is established
Mel Gorman 60bfe9
      and no acknowledgment is needed.
Mel Gorman 60bfe9
 - **AUTOFS_IOC_EXPIRE_MULTI**:  This is similar to
Mel Gorman 60bfe9
--- a/block/blk-mq.c
Mel Gorman 60bfe9
+++ b/block/blk-mq.c
Michal Marek f1645f
@@ -923,7 +923,7 @@ static bool reorder_tags_to_front(struct
Mel Gorman 60bfe9
 	return first != NULL;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int blk_mq_dispatch_wake(wait_queue_t *wait, unsigned mode, int flags,
Mel Gorman 60bfe9
+static int blk_mq_dispatch_wake(wait_queue_entry_t *wait, unsigned mode, int flags,
Mel Gorman 60bfe9
 				void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct blk_mq_hw_ctx *hctx;
Mel Gorman 60bfe9
--- a/block/blk-wbt.c
Mel Gorman 60bfe9
+++ b/block/blk-wbt.c
Michal Marek f1645f
@@ -503,7 +503,7 @@ static inline unsigned int get_limit(str
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw,
Mel Gorman 60bfe9
-			     wait_queue_t *wait, unsigned long rw)
Mel Gorman 60bfe9
+			     wait_queue_entry_t *wait, unsigned long rw)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	/*
Mel Gorman 60bfe9
 	 * inc it here even if disabled, since we'll dec it at completion.
Mel Gorman 60bfe9
--- a/block/kyber-iosched.c
Mel Gorman 60bfe9
+++ b/block/kyber-iosched.c
Mel Gorman 60bfe9
@@ -99,7 +99,7 @@ struct kyber_hctx_data {
Mel Gorman 60bfe9
 	struct list_head rqs[KYBER_NUM_DOMAINS];
Mel Gorman 60bfe9
 	unsigned int cur_domain;
Mel Gorman 60bfe9
 	unsigned int batching;
Mel Gorman 60bfe9
-	wait_queue_t domain_wait[KYBER_NUM_DOMAINS];
Mel Gorman 60bfe9
+	wait_queue_entry_t domain_wait[KYBER_NUM_DOMAINS];
Mel Gorman 60bfe9
 	atomic_t wait_index[KYBER_NUM_DOMAINS];
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -507,7 +507,7 @@ static void kyber_flush_busy_ctxs(struct
Mel Gorman 60bfe9
 	}
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int kyber_domain_wake(wait_queue_t *wait, unsigned mode, int flags,
Mel Gorman 60bfe9
+static int kyber_domain_wake(wait_queue_entry_t *wait, unsigned mode, int flags,
Mel Gorman 60bfe9
 			     void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct blk_mq_hw_ctx *hctx = READ_ONCE(wait->private);
Michal Marek f1645f
@@ -523,7 +523,7 @@ static int kyber_get_domain_token(struct
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned int sched_domain = khd->cur_domain;
Mel Gorman 60bfe9
 	struct sbitmap_queue *domain_tokens = &kqd->domain_tokens[sched_domain];
Mel Gorman 60bfe9
-	wait_queue_t *wait = &khd->domain_wait[sched_domain];
Mel Gorman 60bfe9
+	wait_queue_entry_t *wait = &khd->domain_wait[sched_domain];
Mel Gorman 60bfe9
 	struct sbq_wait_state *ws;
Mel Gorman 60bfe9
 	int nr;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -734,7 +734,7 @@ static int kyber_##name##_waiting_show(v
Mel Gorman 60bfe9
 {									\
Mel Gorman 60bfe9
 	struct blk_mq_hw_ctx *hctx = data;				\
Mel Gorman 60bfe9
 	struct kyber_hctx_data *khd = hctx->sched_data;			\
Mel Gorman 60bfe9
-	wait_queue_t *wait = &khd->domain_wait[domain];			\
Mel Gorman 60bfe9
+	wait_queue_entry_t *wait = &khd->domain_wait[domain];		\
Mel Gorman 60bfe9
 									\
Mel Gorman 60bfe9
 	seq_printf(m, "%d\n", !list_empty_careful(&wait->task_list));	\
Mel Gorman 60bfe9
 	return 0;							\
Mel Gorman 60bfe9
--- a/drivers/bluetooth/btmrvl_main.c
Mel Gorman 60bfe9
+++ b/drivers/bluetooth/btmrvl_main.c
Michal Marek f1645f
@@ -602,7 +602,7 @@ static int btmrvl_service_main_thread(vo
Mel Gorman 60bfe9
 	struct btmrvl_thread *thread = data;
Mel Gorman 60bfe9
 	struct btmrvl_private *priv = thread->priv;
Mel Gorman 60bfe9
 	struct btmrvl_adapter *adapter = priv->adapter;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct sk_buff *skb;
Mel Gorman 60bfe9
 	ulong flags;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/char/ipmi/ipmi_watchdog.c
Mel Gorman 60bfe9
+++ b/drivers/char/ipmi/ipmi_watchdog.c
Michal Marek f1645f
@@ -821,7 +821,7 @@ static ssize_t ipmi_read(struct file *fi
Mel Gorman 60bfe9
 			 loff_t      *ppos)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int          rv = 0;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (count <= 0)
Mel Gorman 60bfe9
 		return 0;
Mel Gorman 60bfe9
--- a/drivers/gpu/drm/i915/i915_gem_request.h
Mel Gorman 60bfe9
+++ b/drivers/gpu/drm/i915/i915_gem_request.h
Mel Gorman 60bfe9
@@ -123,7 +123,7 @@ struct drm_i915_gem_request {
Mel Gorman 60bfe9
 	 * It is used by the driver to then queue the request for execution.
Mel Gorman 60bfe9
 	 */
Mel Gorman 60bfe9
 	struct i915_sw_fence submit;
Mel Gorman 60bfe9
-	wait_queue_t submitq;
Mel Gorman 60bfe9
+	wait_queue_entry_t submitq;
Mel Gorman 60bfe9
 	wait_queue_head_t execute;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* A list of everyone we wait upon, and everyone who waits upon us.
Mel Gorman 60bfe9
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
Mel Gorman 60bfe9
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
Michal Marek f1645f
@@ -152,7 +152,7 @@ static void __i915_sw_fence_wake_up_all(
Mel Gorman 60bfe9
 					struct list_head *continuation)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	wait_queue_head_t *x = &fence->wait;
Mel Gorman 60bfe9
-	wait_queue_t *pos, *next;
Mel Gorman 60bfe9
+	wait_queue_entry_t *pos, *next;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	debug_fence_deactivate(fence);
Michal Marek f1645f
@@ -254,7 +254,7 @@ void i915_sw_fence_commit(struct i915_sw
Mel Gorman 60bfe9
 	__i915_sw_fence_commit(fence);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int i915_sw_fence_wake(wait_queue_t *wq, unsigned mode, int flags, void *key)
Mel Gorman 60bfe9
+static int i915_sw_fence_wake(wait_queue_entry_t *wq, unsigned mode, int flags, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	list_del(&wq->task_list);
Mel Gorman 60bfe9
 	__i915_sw_fence_complete(wq->private, key);
Michal Marek f1645f
@@ -267,7 +267,7 @@ static int i915_sw_fence_wake(wait_queue
Mel Gorman 60bfe9
 static bool __i915_sw_fence_check_if_after(struct i915_sw_fence *fence,
Mel Gorman 60bfe9
 				    const struct i915_sw_fence * const signaler)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t *wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t *wq;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (__test_and_set_bit(I915_SW_FENCE_CHECKED_BIT, &fence->flags))
Mel Gorman 60bfe9
 		return false;
Michal Marek f1645f
@@ -288,7 +288,7 @@ static bool __i915_sw_fence_check_if_aft
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static void __i915_sw_fence_clear_checked_bit(struct i915_sw_fence *fence)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t *wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t *wq;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (!__test_and_clear_bit(I915_SW_FENCE_CHECKED_BIT, &fence->flags))
Mel Gorman 60bfe9
 		return;
Michal Marek f1645f
@@ -320,7 +320,7 @@ static bool i915_sw_fence_check_if_after
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
Mel Gorman 60bfe9
 					  struct i915_sw_fence *signaler,
Mel Gorman 60bfe9
-					  wait_queue_t *wq, gfp_t gfp)
Mel Gorman 60bfe9
+					  wait_queue_entry_t *wq, gfp_t gfp)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	int pending;
Michal Marek f1645f
@@ -359,7 +359,7 @@ static int __i915_sw_fence_await_sw_fenc
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	spin_lock_irqsave(&signaler->wait.lock, flags);
Mel Gorman 60bfe9
 	if (likely(!i915_sw_fence_done(signaler))) {
Mel Gorman 60bfe9
-		__add_wait_queue_tail(&signaler->wait, wq);
Mel Gorman 60bfe9
+		__add_wait_queue_entry_tail(&signaler->wait, wq);
Mel Gorman 60bfe9
 		pending = 1;
Mel Gorman 60bfe9
 	} else {
Mel Gorman 60bfe9
 		i915_sw_fence_wake(wq, 0, 0, NULL);
Michal Marek f1645f
@@ -372,7 +372,7 @@ static int __i915_sw_fence_await_sw_fenc
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
Mel Gorman 60bfe9
 				 struct i915_sw_fence *signaler,
Mel Gorman 60bfe9
-				 wait_queue_t *wq)
Mel Gorman 60bfe9
+				 wait_queue_entry_t *wq)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	return __i915_sw_fence_await_sw_fence(fence, signaler, wq, 0);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
--- a/drivers/gpu/drm/i915/i915_sw_fence.h
Mel Gorman 60bfe9
+++ b/drivers/gpu/drm/i915/i915_sw_fence.h
Michal Marek f1645f
@@ -66,7 +66,7 @@ void i915_sw_fence_commit(struct i915_sw
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
Mel Gorman 60bfe9
 				 struct i915_sw_fence *after,
Mel Gorman 60bfe9
-				 wait_queue_t *wq);
Mel Gorman 60bfe9
+				 wait_queue_entry_t *wq);
Mel Gorman 60bfe9
 int i915_sw_fence_await_sw_fence_gfp(struct i915_sw_fence *fence,
Mel Gorman 60bfe9
 				     struct i915_sw_fence *after,
Mel Gorman 60bfe9
 				     gfp_t gfp);
Mel Gorman 60bfe9
--- a/drivers/gpu/drm/radeon/radeon.h
Mel Gorman 60bfe9
+++ b/drivers/gpu/drm/radeon/radeon.h
Mel Gorman 60bfe9
@@ -375,7 +375,7 @@ struct radeon_fence {
Mel Gorman 60bfe9
 	unsigned		ring;
Mel Gorman 60bfe9
 	bool			is_vm_update;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-	wait_queue_t		fence_wake;
Mel Gorman 60bfe9
+	wait_queue_entry_t		fence_wake;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
Mel Gorman 60bfe9
--- a/drivers/gpu/drm/radeon/radeon_fence.c
Mel Gorman 60bfe9
+++ b/drivers/gpu/drm/radeon/radeon_fence.c
Michal Marek f1645f
@@ -158,7 +158,7 @@ int radeon_fence_emit(struct radeon_devi
Mel Gorman 60bfe9
  * for the fence locking itself, so unlocked variants are used for
Mel Gorman 60bfe9
  * fence_signal, and remove_wait_queue.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-static int radeon_fence_check_signaled(wait_queue_t *wait, unsigned mode, int flags, void *key)
Mel Gorman 60bfe9
+static int radeon_fence_check_signaled(wait_queue_entry_t *wait, unsigned mode, int flags, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct radeon_fence *fence;
Mel Gorman 60bfe9
 	u64 seq;
Mel Gorman 60bfe9
--- a/drivers/gpu/vga/vgaarb.c
Mel Gorman 60bfe9
+++ b/drivers/gpu/vga/vgaarb.c
Michal Marek f1645f
@@ -417,7 +417,7 @@ int vga_get(struct pci_dev *pdev, unsign
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct vga_device *vgadev, *conflict;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int rc = 0;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	vga_check_first_use();
Mel Gorman 60bfe9
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
Mel Gorman 60bfe9
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
Michal Marek f1645f
@@ -1939,7 +1939,7 @@ static int i40iw_virtchnl_receive(struct
Mel Gorman 60bfe9
 bool i40iw_vf_clear_to_send(struct i40iw_sc_dev *dev)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct i40iw_device *iwdev;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	iwdev = dev->back_dev;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/md/bcache/btree.h
Mel Gorman 60bfe9
+++ b/drivers/md/bcache/btree.h
Michal Marek f1645f
@@ -207,7 +207,7 @@ void bkey_put(struct cache_set *c, struc
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct btree_op {
Mel Gorman 60bfe9
 	/* for waiting on btree reserve in btree_split() */
Mel Gorman 60bfe9
-	wait_queue_t		wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t		wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* Btree level at which we start taking write locks */
Mel Gorman 60bfe9
 	short			lock;
Mel Gorman 60bfe9
--- a/drivers/net/ethernet/cavium/liquidio/octeon_main.h
Mel Gorman 60bfe9
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_main.h
Mel Gorman 60bfe9
@@ -144,7 +144,7 @@ static inline int
Mel Gorman 60bfe9
 sleep_cond(wait_queue_head_t *wait_queue, int *condition)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int errno = 0;
Mel Gorman 60bfe9
-	wait_queue_t we;
Mel Gorman 60bfe9
+	wait_queue_entry_t we;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	init_waitqueue_entry(&we, current);
Mel Gorman 60bfe9
 	add_wait_queue(wait_queue, &we);
Michal Marek f1645f
@@ -171,7 +171,7 @@ sleep_timeout_cond(wait_queue_head_t *wa
Mel Gorman 60bfe9
 		   int *condition,
Mel Gorman 60bfe9
 		   int timeout)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t we;
Mel Gorman 60bfe9
+	wait_queue_entry_t we;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	init_waitqueue_entry(&we, current);
Mel Gorman 60bfe9
 	add_wait_queue(wait_queue, &we);
Mel Gorman 60bfe9
--- a/drivers/net/wireless/cisco/airo.c
Mel Gorman 60bfe9
+++ b/drivers/net/wireless/cisco/airo.c
Mel Gorman 60bfe9
@@ -3066,7 +3066,7 @@ static int airo_thread(void *data) {
Mel Gorman 60bfe9
 		if (ai->jobs) {
Mel Gorman 60bfe9
 			locked = down_interruptible(&ai->sem);
Mel Gorman 60bfe9
 		} else {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 			init_waitqueue_entry(&wait, current);
Mel Gorman 60bfe9
 			add_wait_queue(&ai->thr_wait, &wait);
Mel Gorman 60bfe9
--- a/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
Mel Gorman 60bfe9
+++ b/drivers/net/wireless/intersil/hostap/hostap_ioctl.c
Michal Marek f1645f
@@ -2544,7 +2544,7 @@ static int prism2_ioctl_priv_prism2_para
Mel Gorman 60bfe9
 			ret = -EINVAL;
Mel Gorman 60bfe9
 		}
Mel Gorman 60bfe9
 		if (local->iw_mode == IW_MODE_MASTER) {
Mel Gorman 60bfe9
-			wait_queue_t __wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t __wait;
Mel Gorman 60bfe9
 			init_waitqueue_entry(&__wait, current);
Mel Gorman 60bfe9
 			add_wait_queue(&local->hostscan_wq, &__wait);
Mel Gorman 60bfe9
 			set_current_state(TASK_INTERRUPTIBLE);
Mel Gorman 60bfe9
--- a/drivers/net/wireless/marvell/libertas/main.c
Mel Gorman 60bfe9
+++ b/drivers/net/wireless/marvell/libertas/main.c
Mel Gorman 60bfe9
@@ -453,7 +453,7 @@ static int lbs_thread(void *data)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct net_device *dev = data;
Mel Gorman 60bfe9
 	struct lbs_private *priv = dev->ml_priv;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	lbs_deb_enter(LBS_DEB_THREAD);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/scsi/dpt/dpti_i2o.h
Mel Gorman 60bfe9
+++ b/drivers/scsi/dpt/dpti_i2o.h
Mel Gorman 60bfe9
@@ -48,7 +48,7 @@
Mel Gorman 60bfe9
 #include <linux/wait.h>
Mel Gorman 60bfe9
 typedef wait_queue_head_t adpt_wait_queue_head_t;
Mel Gorman 60bfe9
 #define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait)
Mel Gorman 60bfe9
-typedef wait_queue_t adpt_wait_queue_t;
Mel Gorman 60bfe9
+typedef wait_queue_entry_t adpt_wait_queue_entry_t;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
  * message structures
Mel Gorman 60bfe9
--- a/drivers/scsi/ips.c
Mel Gorman 60bfe9
+++ b/drivers/scsi/ips.c
Michal Marek f1645f
@@ -301,13 +301,13 @@ static uint32_t ips_statupd_copperhead_m
Mel Gorman 60bfe9
 static uint32_t ips_statupd_morpheus(ips_ha_t *);
Mel Gorman 60bfe9
 static ips_scb_t *ips_getscb(ips_ha_t *);
Mel Gorman 60bfe9
 static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
Mel Gorman 60bfe9
-static void ips_putq_wait_tail(ips_wait_queue_t *, struct scsi_cmnd *);
Mel Gorman 60bfe9
+static void ips_putq_wait_tail(ips_wait_queue_entry_t *, struct scsi_cmnd *);
Mel Gorman 60bfe9
 static void ips_putq_copp_tail(ips_copp_queue_t *,
Mel Gorman 60bfe9
 				      ips_copp_wait_item_t *);
Mel Gorman 60bfe9
 static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
Mel Gorman 60bfe9
 static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
Mel Gorman 60bfe9
-static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
Mel Gorman 60bfe9
-static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_t *,
Mel Gorman 60bfe9
+static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_entry_t *);
Mel Gorman 60bfe9
+static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_entry_t *,
Mel Gorman 60bfe9
 					  struct scsi_cmnd *);
Mel Gorman 60bfe9
 static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
Mel Gorman 60bfe9
 						     ips_copp_wait_item_t *);
Michal Marek f1645f
@@ -2871,7 +2871,7 @@ ips_removeq_scb(ips_scb_queue_t * queue,
Mel Gorman 60bfe9
 /* ASSUMED to be called from within the HA lock                             */
Mel Gorman 60bfe9
 /*                                                                          */
Mel Gorman 60bfe9
 /****************************************************************************/
Mel Gorman 60bfe9
-static void ips_putq_wait_tail(ips_wait_queue_t *queue, struct scsi_cmnd *item)
Mel Gorman 60bfe9
+static void ips_putq_wait_tail(ips_wait_queue_entry_t *queue, struct scsi_cmnd *item)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	METHOD_TRACE("ips_putq_wait_tail", 1);
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -2902,7 +2902,7 @@ static void ips_putq_wait_tail(ips_wait_
Mel Gorman 60bfe9
 /* ASSUMED to be called from within the HA lock                             */
Mel Gorman 60bfe9
 /*                                                                          */
Mel Gorman 60bfe9
 /****************************************************************************/
Mel Gorman 60bfe9
-static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_t *queue)
Mel Gorman 60bfe9
+static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_entry_t *queue)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct scsi_cmnd *item;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -2936,7 +2936,7 @@ static struct scsi_cmnd *ips_removeq_wai
Mel Gorman 60bfe9
 /* ASSUMED to be called from within the HA lock                             */
Mel Gorman 60bfe9
 /*                                                                          */
Mel Gorman 60bfe9
 /****************************************************************************/
Mel Gorman 60bfe9
-static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_t *queue,
Mel Gorman 60bfe9
+static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_entry_t *queue,
Mel Gorman 60bfe9
 					  struct scsi_cmnd *item)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct scsi_cmnd *p;
Mel Gorman 60bfe9
--- a/drivers/scsi/ips.h
Mel Gorman 60bfe9
+++ b/drivers/scsi/ips.h
Mel Gorman 60bfe9
@@ -989,7 +989,7 @@ typedef struct ips_wait_queue {
Mel Gorman 60bfe9
 	struct scsi_cmnd *head;
Mel Gorman 60bfe9
 	struct scsi_cmnd *tail;
Mel Gorman 60bfe9
 	int count;
Mel Gorman 60bfe9
-} ips_wait_queue_t;
Mel Gorman 60bfe9
+} ips_wait_queue_entry_t;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 typedef struct ips_copp_wait_item {
Mel Gorman 60bfe9
 	struct scsi_cmnd *scsi_cmd;
Mel Gorman 60bfe9
@@ -1035,7 +1035,7 @@ typedef struct ips_ha {
Mel Gorman 60bfe9
    ips_stat_t         sp;                 /* Status packer pointer      */
Mel Gorman 60bfe9
    struct ips_scb    *scbs;               /* Array of all CCBS          */
Mel Gorman 60bfe9
    struct ips_scb    *scb_freelist;       /* SCB free list              */
Mel Gorman 60bfe9
-   ips_wait_queue_t   scb_waitlist;       /* Pending SCB list           */
Mel Gorman 60bfe9
+   ips_wait_queue_entry_t   scb_waitlist;       /* Pending SCB list           */
Mel Gorman 60bfe9
    ips_copp_queue_t   copp_waitlist;      /* Pending PT list            */
Mel Gorman 60bfe9
    ips_scb_queue_t    scb_activelist;     /* Active SCB list            */
Mel Gorman 60bfe9
    IPS_IO_CMD        *dummy;              /* dummy command              */
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
Mel Gorman 60bfe9
@@ -3278,7 +3278,7 @@ int
Mel Gorman 60bfe9
 kiblnd_connd(void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	spinlock_t *lock = &kiblnd_data.kib_connd_lock;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	struct kib_conn *conn;
Mel Gorman 60bfe9
 	int timeout;
Mel Gorman 60bfe9
@@ -3532,7 +3532,7 @@ kiblnd_scheduler(void *arg)
Mel Gorman 60bfe9
 	long id = (long)arg;
Mel Gorman 60bfe9
 	struct kib_sched_info *sched;
Mel Gorman 60bfe9
 	struct kib_conn *conn;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	struct ib_wc wc;
Mel Gorman 60bfe9
 	int did_something;
Mel Gorman 60bfe9
@@ -3667,7 +3667,7 @@ kiblnd_failover_thread(void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	rwlock_t *glock = &kiblnd_data.kib_global_lock;
Mel Gorman 60bfe9
 	struct kib_dev *dev;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	int rc;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
Mel Gorman 60bfe9
@@ -2166,7 +2166,7 @@ ksocknal_connd(void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	spinlock_t *connd_lock = &ksocknal_data.ksnd_connd_lock;
Mel Gorman 60bfe9
 	struct ksock_connreq *cr;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int nloops = 0;
Mel Gorman 60bfe9
 	int cons_retry = 0;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
@@ -2554,7 +2554,7 @@ ksocknal_check_peer_timeouts(int idx)
Mel Gorman 60bfe9
 int
Mel Gorman 60bfe9
 ksocknal_reaper(void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct ksock_conn *conn;
Mel Gorman 60bfe9
 	struct ksock_sched *sched;
Mel Gorman 60bfe9
 	struct list_head enomem_conns;
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/libcfs/debug.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/libcfs/debug.c
Michal Marek f1645f
@@ -361,7 +361,7 @@ static int libcfs_debug_dumplog_thread(v
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 void libcfs_debug_dumplog(void)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct task_struct *dumper;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* we're being careful to ensure that the kernel thread is
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/libcfs/tracefile.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/libcfs/tracefile.c
Mel Gorman 60bfe9
@@ -990,7 +990,7 @@ static int tracefiled(void *arg)
Mel Gorman 60bfe9
 	complete(&tctl->tctl_start);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	while (1) {
Mel Gorman 60bfe9
-		wait_queue_t __wait;
Mel Gorman 60bfe9
+		wait_queue_entry_t __wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		pc.pc_want_daemon_pages = 0;
Mel Gorman 60bfe9
 		collect_pages(&pc);
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
Mel Gorman 60bfe9
@@ -312,7 +312,7 @@ __must_hold(&the_lnet.ln_eq_wait_lock)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int tms = *timeout_ms;
Mel Gorman 60bfe9
 	int wait;
Mel Gorman 60bfe9
-	wait_queue_t wl;
Mel Gorman 60bfe9
+	wait_queue_entry_t wl;
Mel Gorman 60bfe9
 	unsigned long now;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (!tms)
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lnet/lnet/lib-socket.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c
Michal Marek f1645f
@@ -516,7 +516,7 @@ lnet_sock_listen(struct socket **sockp,
Mel Gorman 60bfe9
 int
Mel Gorman 60bfe9
 lnet_sock_accept(struct socket **newsockp, struct socket *sock)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct socket *newsock;
Mel Gorman 60bfe9
 	int rc;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
Michal Marek f1645f
@@ -192,7 +192,7 @@ static int seq_client_alloc_seq(const st
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static int seq_fid_alloc_prep(struct lu_client_seq *seq,
Mel Gorman 60bfe9
-			      wait_queue_t *link)
Mel Gorman 60bfe9
+			      wait_queue_entry_t *link)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	if (seq->lcs_update) {
Mel Gorman 60bfe9
 		add_wait_queue(&seq->lcs_waitq, link);
Michal Marek f1645f
@@ -223,7 +223,7 @@ static void seq_fid_alloc_fini(struct lu
Mel Gorman 60bfe9
 int seq_client_alloc_fid(const struct lu_env *env,
Mel Gorman 60bfe9
 			 struct lu_client_seq *seq, struct lu_fid *fid)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t link;
Mel Gorman 60bfe9
+	wait_queue_entry_t link;
Mel Gorman 60bfe9
 	int rc;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	LASSERT(seq);
Mel Gorman 60bfe9
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(seq_client_alloc_fid);
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 void seq_client_flush(struct lu_client_seq *seq)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t link;
Mel Gorman 60bfe9
+	wait_queue_entry_t link;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	LASSERT(seq);
Mel Gorman 60bfe9
 	init_waitqueue_entry(&link, current);
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/include/lustre_lib.h
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/include/lustre_lib.h
Mel Gorman 60bfe9
@@ -201,7 +201,7 @@ struct l_wait_info {
Mel Gorman 60bfe9
 			   sigmask(SIGALRM))
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /**
Mel Gorman 60bfe9
- * wait_queue_t of Linux (version < 2.6.34) is a FIFO list for exclusively
Mel Gorman 60bfe9
+ * wait_queue_entry_t of Linux (version < 2.6.34) is a FIFO list for exclusively
Mel Gorman 60bfe9
  * waiting threads, which is not always desirable because all threads will
Mel Gorman 60bfe9
  * be waken up again and again, even user only needs a few of them to be
Mel Gorman 60bfe9
  * active most time. This is not good for performance because cache can
Mel Gorman 60bfe9
@@ -228,7 +228,7 @@ struct l_wait_info {
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 #define __l_wait_event(wq, condition, info, ret, l_add_wait)		   \
Mel Gorman 60bfe9
 do {									   \
Mel Gorman 60bfe9
-	wait_queue_t __wait;						 \
Mel Gorman 60bfe9
+	wait_queue_entry_t __wait;						 \
Mel Gorman 60bfe9
 	long __timeout = info->lwi_timeout;			  \
Mel Gorman 60bfe9
 	sigset_t   __blocked;					      \
Mel Gorman 60bfe9
 	int   __allow_intr = info->lwi_allow_intr;			     \
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/llite/lcommon_cl.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/llite/lcommon_cl.c
Michal Marek f1645f
@@ -207,7 +207,7 @@ int cl_file_inode_init(struct inode *ino
Mel Gorman 60bfe9
 static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct lu_object_header *header = obj->co_lu.lo_header;
Mel Gorman 60bfe9
-	wait_queue_t	   waiter;
Mel Gorman 60bfe9
+	wait_queue_entry_t	   waiter;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (unlikely(atomic_read(&header->loh_ref) != 1)) {
Mel Gorman 60bfe9
 		struct lu_site *site = obj->co_lu.lo_dev->ld_site;
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h
Mel Gorman 60bfe9
@@ -370,7 +370,7 @@ struct lov_thread_info {
Mel Gorman 60bfe9
 	struct ost_lvb	  lti_lvb;
Mel Gorman 60bfe9
 	struct cl_2queue	lti_cl2q;
Mel Gorman 60bfe9
 	struct cl_page_list     lti_plist;
Mel Gorman 60bfe9
-	wait_queue_t	  lti_waiter;
Mel Gorman 60bfe9
+	wait_queue_entry_t	  lti_waiter;
Mel Gorman 60bfe9
 	struct cl_attr          lti_attr;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/lov/lov_object.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/lov/lov_object.c
Michal Marek f1645f
@@ -371,7 +371,7 @@ static void lov_subobject_kill(const str
Mel Gorman 60bfe9
 	struct lov_layout_raid0 *r0;
Mel Gorman 60bfe9
 	struct lu_site	  *site;
Mel Gorman 60bfe9
 	struct lu_site_bkt_data *bkt;
Mel Gorman 60bfe9
-	wait_queue_t	  *waiter;
Mel Gorman 60bfe9
+	wait_queue_entry_t	  *waiter;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	r0  = &lov->u.raid0;
Mel Gorman 60bfe9
 	LASSERT(r0->lo_sub[idx] == los);
Mel Gorman 60bfe9
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
Mel Gorman 60bfe9
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
Mel Gorman 60bfe9
@@ -556,7 +556,7 @@ EXPORT_SYMBOL(lu_object_print);
Mel Gorman 60bfe9
 static struct lu_object *htable_lookup(struct lu_site *s,
Mel Gorman 60bfe9
 				       struct cfs_hash_bd *bd,
Mel Gorman 60bfe9
 				       const struct lu_fid *f,
Mel Gorman 60bfe9
-				       wait_queue_t *waiter,
Mel Gorman 60bfe9
+				       wait_queue_entry_t *waiter,
Mel Gorman 60bfe9
 				       __u64 *version)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct lu_site_bkt_data *bkt;
Michal Marek f1645f
@@ -670,7 +670,7 @@ static struct lu_object *lu_object_find_
Mel Gorman 60bfe9
 					    struct lu_device *dev,
Mel Gorman 60bfe9
 					    const struct lu_fid *f,
Mel Gorman 60bfe9
 					    const struct lu_object_conf *conf,
Mel Gorman 60bfe9
-					    wait_queue_t *waiter)
Mel Gorman 60bfe9
+					    wait_queue_entry_t *waiter)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct lu_object      *o;
Mel Gorman 60bfe9
 	struct lu_object      *shadow;
Michal Marek f1645f
@@ -750,7 +750,7 @@ struct lu_object *lu_object_find_at(cons
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct lu_site_bkt_data *bkt;
Mel Gorman 60bfe9
 	struct lu_object	*obj;
Mel Gorman 60bfe9
-	wait_queue_t	   wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t	   wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	while (1) {
Mel Gorman 60bfe9
 		obj = lu_object_find_try(env, dev, f, conf, &wait);
Mel Gorman 60bfe9
--- a/drivers/tty/synclink_gt.c
Mel Gorman 60bfe9
+++ b/drivers/tty/synclink_gt.c
Michal Marek f1645f
@@ -184,7 +184,7 @@ static void hdlcdev_exit(struct slgt_inf
Mel Gorman 60bfe9
 struct cond_wait {
Mel Gorman 60bfe9
 	struct cond_wait *next;
Mel Gorman 60bfe9
 	wait_queue_head_t q;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	unsigned int data;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 static void init_cond_wait(struct cond_wait *w, unsigned int data);
Mel Gorman 60bfe9
--- a/drivers/vfio/virqfd.c
Mel Gorman 60bfe9
+++ b/drivers/vfio/virqfd.c
Michal Marek f1645f
@@ -43,7 +43,7 @@ static void virqfd_deactivate(struct vir
Mel Gorman 60bfe9
 	queue_work(vfio_irqfd_cleanup_wq, &virqfd->shutdown);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int virqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int virqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct virqfd *virqfd = container_of(wait, struct virqfd, wait);
Mel Gorman 60bfe9
 	unsigned long flags = (unsigned long)key;
Mel Gorman 60bfe9
--- a/drivers/vhost/vhost.c
Mel Gorman 60bfe9
+++ b/drivers/vhost/vhost.c
Michal Marek f1645f
@@ -165,7 +165,7 @@ static void vhost_poll_func(struct file
Mel Gorman 60bfe9
 	add_wait_queue(wqh, &poll->wait);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
Mel Gorman 60bfe9
+static int vhost_poll_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync,
Mel Gorman 60bfe9
 			     void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait);
Mel Gorman 60bfe9
--- a/drivers/vhost/vhost.h
Mel Gorman 60bfe9
+++ b/drivers/vhost/vhost.h
Mel Gorman 60bfe9
@@ -31,7 +31,7 @@ struct vhost_work {
Mel Gorman 60bfe9
 struct vhost_poll {
Mel Gorman 60bfe9
 	poll_table                table;
Mel Gorman 60bfe9
 	wait_queue_head_t        *wqh;
Mel Gorman 60bfe9
-	wait_queue_t              wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t              wait;
Mel Gorman 60bfe9
 	struct vhost_work	  work;
Mel Gorman 60bfe9
 	unsigned long		  mask;
Mel Gorman 60bfe9
 	struct vhost_dev	 *dev;
Mel Gorman 60bfe9
--- a/fs/autofs4/autofs_i.h
Mel Gorman 60bfe9
+++ b/fs/autofs4/autofs_i.h
Mel Gorman 60bfe9
@@ -83,7 +83,7 @@ struct autofs_info {
Mel Gorman 60bfe9
 struct autofs_wait_queue {
Mel Gorman 60bfe9
 	wait_queue_head_t queue;
Mel Gorman 60bfe9
 	struct autofs_wait_queue *next;
Mel Gorman 60bfe9
-	autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+	autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
 	/* We use the following to see what we are waiting for */
Mel Gorman 60bfe9
 	struct qstr name;
Mel Gorman 60bfe9
 	u32 dev;
Mel Gorman 60bfe9
--- a/fs/autofs4/waitq.c
Mel Gorman 60bfe9
+++ b/fs/autofs4/waitq.c
Michal Marek f1645f
@@ -104,7 +104,7 @@ static void autofs4_notify_daemon(struct
Mel Gorman 60bfe9
 	size_t pktsz;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	pr_debug("wait id = 0x%08lx, name = %.*s, type=%d\n",
Mel Gorman 60bfe9
-		 (unsigned long) wq->wait_queue_token,
Mel Gorman 60bfe9
+		 (unsigned long) wq->wait_queue_entry_token,
Mel Gorman 60bfe9
 		 wq->name.len, wq->name.name, type);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	memset(&pkt, 0, sizeof(pkt)); /* For security reasons */
Michal Marek f1645f
@@ -120,7 +120,7 @@ static void autofs4_notify_daemon(struct
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		pktsz = sizeof(*mp);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-		mp->wait_queue_token = wq->wait_queue_token;
Mel Gorman 60bfe9
+		mp->wait_queue_entry_token = wq->wait_queue_entry_token;
Mel Gorman 60bfe9
 		mp->len = wq->name.len;
Mel Gorman 60bfe9
 		memcpy(mp->name, wq->name.name, wq->name.len);
Mel Gorman 60bfe9
 		mp->name[wq->name.len] = '\0';
Michal Marek f1645f
@@ -133,7 +133,7 @@ static void autofs4_notify_daemon(struct
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		pktsz = sizeof(*ep);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-		ep->wait_queue_token = wq->wait_queue_token;
Mel Gorman 60bfe9
+		ep->wait_queue_entry_token = wq->wait_queue_entry_token;
Mel Gorman 60bfe9
 		ep->len = wq->name.len;
Mel Gorman 60bfe9
 		memcpy(ep->name, wq->name.name, wq->name.len);
Mel Gorman 60bfe9
 		ep->name[wq->name.len] = '\0';
Michal Marek f1645f
@@ -153,7 +153,7 @@ static void autofs4_notify_daemon(struct
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		pktsz = sizeof(*packet);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-		packet->wait_queue_token = wq->wait_queue_token;
Mel Gorman 60bfe9
+		packet->wait_queue_entry_token = wq->wait_queue_entry_token;
Mel Gorman 60bfe9
 		packet->len = wq->name.len;
Mel Gorman 60bfe9
 		memcpy(packet->name, wq->name.name, wq->name.len);
Mel Gorman 60bfe9
 		packet->name[wq->name.len] = '\0';
Michal Marek f1645f
@@ -428,7 +428,7 @@ int autofs4_wait(struct autofs_sb_info *
Mel Gorman 60bfe9
 			return -ENOMEM;
Mel Gorman 60bfe9
 		}
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-		wq->wait_queue_token = autofs4_next_wait_queue;
Mel Gorman 60bfe9
+		wq->wait_queue_entry_token = autofs4_next_wait_queue;
Mel Gorman 60bfe9
 		if (++autofs4_next_wait_queue == 0)
Mel Gorman 60bfe9
 			autofs4_next_wait_queue = 1;
Mel Gorman 60bfe9
 		wq->next = sbi->queues;
Michal Marek f1645f
@@ -461,7 +461,7 @@ int autofs4_wait(struct autofs_sb_info *
Mel Gorman 60bfe9
 		}
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		pr_debug("new wait id = 0x%08lx, name = %.*s, nfy=%d\n",
Mel Gorman 60bfe9
-			 (unsigned long) wq->wait_queue_token, wq->name.len,
Mel Gorman 60bfe9
+			 (unsigned long) wq->wait_queue_entry_token, wq->name.len,
Mel Gorman 60bfe9
 			 wq->name.name, notify);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		/*
Michal Marek f1645f
@@ -471,7 +471,7 @@ int autofs4_wait(struct autofs_sb_info *
Mel Gorman 60bfe9
 	} else {
Mel Gorman 60bfe9
 		wq->wait_ctr++;
Mel Gorman 60bfe9
 		pr_debug("existing wait id = 0x%08lx, name = %.*s, nfy=%d\n",
Mel Gorman 60bfe9
-			 (unsigned long) wq->wait_queue_token, wq->name.len,
Mel Gorman 60bfe9
+			 (unsigned long) wq->wait_queue_entry_token, wq->name.len,
Mel Gorman 60bfe9
 			 wq->name.name, notify);
Mel Gorman 60bfe9
 		mutex_unlock(&sbi->wq_mutex);
Mel Gorman 60bfe9
 		kfree(qstr.name);
Michal Marek f1645f
@@ -550,13 +550,13 @@ int autofs4_wait(struct autofs_sb_info *
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_token, int status)
Mel Gorman 60bfe9
+int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_entry_token, int status)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct autofs_wait_queue *wq, **wql;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	mutex_lock(&sbi->wq_mutex);
Mel Gorman 60bfe9
 	for (wql = &sbi->queues; (wq = *wql) != NULL; wql = &wq->next) {
Mel Gorman 60bfe9
-		if (wq->wait_queue_token == wait_queue_token)
Mel Gorman 60bfe9
+		if (wq->wait_queue_entry_token == wait_queue_entry_token)
Mel Gorman 60bfe9
 			break;
Mel Gorman 60bfe9
 	}
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/fs/cachefiles/internal.h
Mel Gorman 60bfe9
+++ b/fs/cachefiles/internal.h
Mel Gorman 60bfe9
@@ -97,7 +97,7 @@ struct cachefiles_cache {
Mel Gorman 60bfe9
  * backing file read tracking
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 struct cachefiles_one_read {
Mel Gorman 60bfe9
-	wait_queue_t			monitor;	/* link into monitored waitqueue */
Mel Gorman 60bfe9
+	wait_queue_entry_t			monitor;	/* link into monitored waitqueue */
Mel Gorman 60bfe9
 	struct page			*back_page;	/* backing file page we're waiting for */
Mel Gorman 60bfe9
 	struct page			*netfs_page;	/* netfs page we're going to fill */
Mel Gorman 60bfe9
 	struct fscache_retrieval	*op;		/* retrieval op covering this */
Mel Gorman 60bfe9
--- a/fs/cachefiles/namei.c
Mel Gorman 60bfe9
+++ b/fs/cachefiles/namei.c
Michal Marek f1645f
@@ -204,7 +204,7 @@ wait_for_old_object:
Mel Gorman 60bfe9
 		wait_queue_head_t *wq;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		signed long timeout = 60 * HZ;
Mel Gorman 60bfe9
-		wait_queue_t wait;
Mel Gorman 60bfe9
+		wait_queue_entry_t wait;
Mel Gorman 60bfe9
 		bool requeue;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		/* if the object we're waiting for is queued for processing,
Mel Gorman 60bfe9
--- a/fs/cachefiles/rdwr.c
Mel Gorman 60bfe9
+++ b/fs/cachefiles/rdwr.c
Mel Gorman 60bfe9
@@ -21,7 +21,7 @@
Mel Gorman 60bfe9
  * - we use this to detect read completion of backing pages
Mel Gorman 60bfe9
  * - the caller holds the waitqueue lock
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-static int cachefiles_read_waiter(wait_queue_t *wait, unsigned mode,
Mel Gorman 60bfe9
+static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode,
Mel Gorman 60bfe9
 				  int sync, void *_key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct cachefiles_one_read *monitor =
Mel Gorman 60bfe9
--- a/fs/dax.c
Mel Gorman 60bfe9
+++ b/fs/dax.c
Mel Gorman 60bfe9
@@ -84,7 +84,7 @@ struct exceptional_entry_key {
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct wait_exceptional_entry_queue {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct exceptional_entry_key key;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -108,7 +108,7 @@ static wait_queue_head_t *dax_entry_wait
Mel Gorman 60bfe9
 	return wait_table + hash;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int wake_exceptional_entry_func(wait_queue_t *wait, unsigned int mode,
Mel Gorman 60bfe9
+static int wake_exceptional_entry_func(wait_queue_entry_t *wait, unsigned int mode,
Mel Gorman 60bfe9
 				       int sync, void *keyp)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct exceptional_entry_key *key = keyp;
Mel Gorman 60bfe9
--- a/fs/eventfd.c
Mel Gorman 60bfe9
+++ b/fs/eventfd.c
Michal Marek f1645f
@@ -191,7 +191,7 @@ static void eventfd_ctx_do_read(struct e
Mel Gorman 60bfe9
  * This is used to atomically remove a wait queue entry from the eventfd wait
Mel Gorman 60bfe9
  * queue head, and read/reset the counter value.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait,
Mel Gorman 60bfe9
+int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
Mel Gorman 60bfe9
 				  __u64 *cnt)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
--- a/fs/eventpoll.c
Mel Gorman 60bfe9
+++ b/fs/eventpoll.c
Mel Gorman 60bfe9
@@ -244,7 +244,7 @@ struct eppoll_entry {
Mel Gorman 60bfe9
 	 * Wait queue item that will be linked to the target file wait
Mel Gorman 60bfe9
 	 * queue head.
Mel Gorman 60bfe9
 	 */
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* The wait queue head that linked the "wait" wait queue item */
Mel Gorman 60bfe9
 	wait_queue_head_t *whead;
Michal Marek f1645f
@@ -347,13 +347,13 @@ static inline int ep_is_linked(struct li
Mel Gorman 60bfe9
 	return !list_empty(p);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_t *p)
Mel Gorman 60bfe9
+static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_entry_t *p)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	return container_of(p, struct eppoll_entry, wait);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /* Get the "struct epitem" from a wait queue pointer */
Mel Gorman 60bfe9
-static inline struct epitem *ep_item_from_wait(wait_queue_t *p)
Mel Gorman 60bfe9
+static inline struct epitem *ep_item_from_wait(wait_queue_entry_t *p)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	return container_of(p, struct eppoll_entry, wait)->base;
Mel Gorman 60bfe9
 }
Michal Marek f1645f
@@ -1078,7 +1078,7 @@ static struct epitem *ep_find(struct eve
Mel Gorman 60bfe9
  * mechanism. It is called by the stored file descriptors when they
Mel Gorman 60bfe9
  * have events to report.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int pwake = 0;
Mel Gorman 60bfe9
 	unsigned long flags;
Michal Marek f1645f
@@ -1699,7 +1699,7 @@ static int ep_poll(struct eventpoll *ep,
Mel Gorman 60bfe9
 	int res = 0, eavail, timed_out = 0;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	u64 slack = 0;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	ktime_t expires, *to = NULL;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (timeout > 0) {
Mel Gorman 60bfe9
--- a/fs/fs_pin.c
Mel Gorman 60bfe9
+++ b/fs/fs_pin.c
Michal Marek f1645f
@@ -34,7 +34,7 @@ void pin_insert(struct fs_pin *pin, stru
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 void pin_kill(struct fs_pin *p)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (!p) {
Mel Gorman 60bfe9
 		rcu_read_unlock();
Mel Gorman 60bfe9
--- a/fs/nfs/nfs4proc.c
Mel Gorman 60bfe9
+++ b/fs/nfs/nfs4proc.c
Mel Gorman 60bfe9
@@ -6373,7 +6373,7 @@ struct nfs4_lock_waiter {
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static int
Mel Gorman 60bfe9
-nfs4_wake_lock_waiter(wait_queue_t *wait, unsigned int mode, int flags, void *key)
Mel Gorman 60bfe9
+nfs4_wake_lock_waiter(wait_queue_entry_t *wait, unsigned int mode, int flags, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int ret;
Mel Gorman 60bfe9
 	struct cb_notify_lock_args *cbnl = key;
Michal Marek f1645f
@@ -6416,7 +6416,7 @@ nfs4_retry_setlk(struct nfs4_state *stat
Mel Gorman 60bfe9
 					   .inode = state->inode,
Mel Gorman 60bfe9
 					   .owner = &owner,
Mel Gorman 60bfe9
 					   .notified = false };
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* Don't bother with waitqueue if we don't expect a callback */
Mel Gorman 60bfe9
 	if (!test_bit(NFS_STATE_MAY_NOTIFY_LOCK, &state->flags))
Mel Gorman 60bfe9
--- a/fs/nilfs2/segment.c
Mel Gorman 60bfe9
+++ b/fs/nilfs2/segment.c
Michal Marek f1645f
@@ -2161,7 +2161,7 @@ void nilfs_flush_segment(struct super_bl
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct nilfs_segctor_wait_request {
Mel Gorman 60bfe9
-	wait_queue_t	wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t	wq;
Mel Gorman 60bfe9
 	__u32		seq;
Mel Gorman 60bfe9
 	int		err;
Mel Gorman 60bfe9
 	atomic_t	done;
Mel Gorman 60bfe9
--- a/fs/orangefs/orangefs-bufmap.c
Mel Gorman 60bfe9
+++ b/fs/orangefs/orangefs-bufmap.c
Mel Gorman 60bfe9
@@ -47,7 +47,7 @@ static void run_down(struct slot_map *m)
Mel Gorman 60bfe9
 	if (m->c != -1) {
Mel Gorman 60bfe9
 		for (;;) {
Mel Gorman 60bfe9
 			if (likely(list_empty(&wait.task_list)))
Mel Gorman 60bfe9
-				__add_wait_queue_tail(&m->q, &wait);
Mel Gorman 60bfe9
+				__add_wait_queue_entry_tail(&m->q, &wait);
Mel Gorman 60bfe9
 			set_current_state(TASK_UNINTERRUPTIBLE);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 			if (m->c == -1)
Michal Marek f1645f
@@ -85,7 +85,7 @@ static int wait_for_free(struct slot_map
Mel Gorman 60bfe9
 	do {
Mel Gorman 60bfe9
 		long n = left, t;
Mel Gorman 60bfe9
 		if (likely(list_empty(&wait.task_list)))
Mel Gorman 60bfe9
-			__add_wait_queue_tail_exclusive(&m->q, &wait);
Mel Gorman 60bfe9
+			__add_wait_queue_entry_tail_exclusive(&m->q, &wait);
Mel Gorman 60bfe9
 		set_current_state(TASK_INTERRUPTIBLE);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		if (m->c > 0)
Mel Gorman 60bfe9
--- a/fs/reiserfs/journal.c
Mel Gorman 60bfe9
+++ b/fs/reiserfs/journal.c
Michal Marek f1645f
@@ -2956,7 +2956,7 @@ void reiserfs_wait_on_write_block(struct
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static void queue_log_writer(struct super_block *s)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct reiserfs_journal *journal = SB_JOURNAL(s);
Mel Gorman 60bfe9
 	set_bit(J_WRITERS_QUEUED, &journal->j_state);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/fs/select.c
Mel Gorman 60bfe9
+++ b/fs/select.c
Michal Marek f1645f
@@ -180,7 +180,7 @@ static struct poll_table_entry *poll_get
Mel Gorman 60bfe9
 	return table->entry++;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int __pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int __pollwake(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct poll_wqueues *pwq = wait->private;
Mel Gorman 60bfe9
 	DECLARE_WAITQUEUE(dummy_wait, pwq->polling_task);
Michal Marek f1645f
@@ -206,7 +206,7 @@ static int __pollwake(wait_queue_t *wait
Mel Gorman 60bfe9
 	return default_wake_function(&dummy_wait, mode, sync, key);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int pollwake(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct poll_table_entry *entry;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/fs/signalfd.c
Mel Gorman 60bfe9
+++ b/fs/signalfd.c
Michal Marek f1645f
@@ -43,7 +43,7 @@ void signalfd_cleanup(struct sighand_str
Mel Gorman 60bfe9
 	if (likely(!waitqueue_active(wqh)))
Mel Gorman 60bfe9
 		return;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-	/* wait_queue_t->func(POLLFREE) should do remove_wait_queue() */
Mel Gorman 60bfe9
+	/* wait_queue_entry_t->func(POLLFREE) should do remove_wait_queue() */
Mel Gorman 60bfe9
 	wake_up_poll(wqh, POLLHUP | POLLFREE);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/fs/userfaultfd.c
Mel Gorman 60bfe9
+++ b/fs/userfaultfd.c
Mel Gorman 60bfe9
@@ -81,7 +81,7 @@ struct userfaultfd_unmap_ctx {
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct userfaultfd_wait_queue {
Mel Gorman 60bfe9
 	struct uffd_msg msg;
Mel Gorman 60bfe9
-	wait_queue_t wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t wq;
Mel Gorman 60bfe9
 	struct userfaultfd_ctx *ctx;
Mel Gorman 60bfe9
 	bool waken;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
@@ -91,7 +91,7 @@ struct userfaultfd_wake_range {
Mel Gorman 60bfe9
 	unsigned long len;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int userfaultfd_wake_function(wait_queue_t *wq, unsigned mode,
Mel Gorman 60bfe9
+static int userfaultfd_wake_function(wait_queue_entry_t *wq, unsigned mode,
Mel Gorman 60bfe9
 				     int wake_flags, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct userfaultfd_wake_range *range = key;
Michal Marek f1645f
@@ -863,7 +863,7 @@ wakeup:
Mel Gorman 60bfe9
 static inline struct userfaultfd_wait_queue *find_userfault_in(
Mel Gorman 60bfe9
 		wait_queue_head_t *wqh)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t *wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t *wq;
Mel Gorman 60bfe9
 	struct userfaultfd_wait_queue *uwq;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	VM_BUG_ON(!spin_is_locked(&wqh->lock));
Michal Marek f1645f
@@ -1752,7 +1752,7 @@ static long userfaultfd_ioctl(struct fil
Mel Gorman 60bfe9
 static void userfaultfd_show_fdinfo(struct seq_file *m, struct file *f)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct userfaultfd_ctx *ctx = f->private_data;
Mel Gorman 60bfe9
-	wait_queue_t *wq;
Mel Gorman 60bfe9
+	wait_queue_entry_t *wq;
Mel Gorman 60bfe9
 	struct userfaultfd_wait_queue *uwq;
Mel Gorman 60bfe9
 	unsigned long pending = 0, total = 0;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/include/linux/blk-mq.h
Mel Gorman 60bfe9
+++ b/include/linux/blk-mq.h
Mel Gorman 60bfe9
@@ -33,7 +33,7 @@ struct blk_mq_hw_ctx {
Mel Gorman 60bfe9
 	struct blk_mq_ctx	**ctxs;
Mel Gorman 60bfe9
 	unsigned int		nr_ctx;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-	wait_queue_t		dispatch_wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t		dispatch_wait;
Mel Gorman 60bfe9
 	atomic_t		wait_index;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	struct blk_mq_tags	*tags;
Mel Gorman 60bfe9
--- a/include/linux/eventfd.h
Mel Gorman 60bfe9
+++ b/include/linux/eventfd.h
Michal Marek f1645f
@@ -37,7 +37,7 @@ struct eventfd_ctx *eventfd_ctx_fdget(in
Mel Gorman 60bfe9
 struct eventfd_ctx *eventfd_ctx_fileget(struct file *file);
Mel Gorman 60bfe9
 __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n);
Mel Gorman 60bfe9
 ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt);
Mel Gorman 60bfe9
-int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait,
Mel Gorman 60bfe9
+int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
Mel Gorman 60bfe9
 				  __u64 *cnt);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 #else /* CONFIG_EVENTFD */
Michal Marek f1645f
@@ -73,7 +73,7 @@ static inline ssize_t eventfd_ctx_read(s
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx,
Mel Gorman 60bfe9
-						wait_queue_t *wait, __u64 *cnt)
Mel Gorman 60bfe9
+						wait_queue_entry_t *wait, __u64 *cnt)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	return -ENOSYS;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
--- a/include/linux/kvm_irqfd.h
Mel Gorman 60bfe9
+++ b/include/linux/kvm_irqfd.h
Mel Gorman 60bfe9
@@ -46,7 +46,7 @@ struct kvm_kernel_irqfd_resampler {
Mel Gorman 60bfe9
 struct kvm_kernel_irqfd {
Mel Gorman 60bfe9
 	/* Used for MSI fast-path */
Mel Gorman 60bfe9
 	struct kvm *kvm;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	/* Update side is protected by irqfds.lock */
Mel Gorman 60bfe9
 	struct kvm_kernel_irq_routing_entry irq_entry;
Mel Gorman 60bfe9
 	seqcount_t irq_entry_sc;
Mel Gorman 60bfe9
--- a/include/linux/pagemap.h
Mel Gorman 60bfe9
+++ b/include/linux/pagemap.h
Michal Marek f1645f
@@ -524,7 +524,7 @@ void page_endio(struct page *page, bool
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
  * Add an arbitrary waiter to a page's wait queue
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter);
Mel Gorman 60bfe9
+extern void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
  * Fault everything in given userspace address range in.
Mel Gorman 60bfe9
--- a/include/linux/poll.h
Mel Gorman 60bfe9
+++ b/include/linux/poll.h
Michal Marek f1645f
@@ -75,7 +75,7 @@ static inline void init_poll_funcptr(pol
Mel Gorman 60bfe9
 struct poll_table_entry {
Mel Gorman 60bfe9
 	struct file *filp;
Mel Gorman 60bfe9
 	unsigned long key;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	wait_queue_head_t *wait_address;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/include/linux/vfio.h
Mel Gorman 60bfe9
+++ b/include/linux/vfio.h
Mel Gorman 60bfe9
@@ -185,7 +185,7 @@ struct virqfd {
Mel Gorman 60bfe9
 	void			(*thread)(void *, void *);
Mel Gorman 60bfe9
 	void			*data;
Mel Gorman 60bfe9
 	struct work_struct	inject;
Mel Gorman 60bfe9
-	wait_queue_t		wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t		wait;
Mel Gorman 60bfe9
 	poll_table		pt;
Mel Gorman 60bfe9
 	struct work_struct	shutdown;
Mel Gorman 60bfe9
 	struct virqfd		**pvirqfd;
Mel Gorman 60bfe9
--- a/include/linux/wait.h
Mel Gorman 60bfe9
+++ b/include/linux/wait.h
Mel Gorman 60bfe9
@@ -10,15 +10,18 @@
Mel Gorman 60bfe9
 #include <asm/current.h>
Mel Gorman 60bfe9
 #include <uapi/linux/wait.h>
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-typedef struct __wait_queue wait_queue_t;
Mel Gorman 60bfe9
-typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key);
Mel Gorman 60bfe9
-int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key);
Mel Gorman 60bfe9
+typedef struct wait_queue_entry wait_queue_entry_t;
Mel Gorman 60bfe9
+typedef int (*wait_queue_func_t)(wait_queue_entry_t *wait, unsigned mode, int flags, void *key);
Mel Gorman 60bfe9
+int default_wake_function(wait_queue_entry_t *wait, unsigned mode, int flags, void *key);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-/* __wait_queue::flags */
Mel Gorman 60bfe9
+/* wait_queue_entry::flags */
Mel Gorman 60bfe9
 #define WQ_FLAG_EXCLUSIVE	0x01
Mel Gorman 60bfe9
 #define WQ_FLAG_WOKEN		0x02
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-struct __wait_queue {
Mel Gorman 60bfe9
+/*
Mel Gorman 60bfe9
+ * A single wait-queue entry structure:
Mel Gorman 60bfe9
+ */
Mel Gorman 60bfe9
+struct wait_queue_entry {
Mel Gorman 60bfe9
 	unsigned int		flags;
Mel Gorman 60bfe9
 	void			*private;
Mel Gorman 60bfe9
 	wait_queue_func_t	func;
Mel Gorman 60bfe9
@@ -34,7 +37,7 @@ struct wait_bit_key {
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct wait_bit_queue {
Mel Gorman 60bfe9
 	struct wait_bit_key	key;
Mel Gorman 60bfe9
-	wait_queue_t		wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t	wait;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct __wait_queue_head {
Mel Gorman 60bfe9
@@ -55,7 +58,7 @@ struct task_struct;
Mel Gorman 60bfe9
 	.task_list	= { NULL, NULL } }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 #define DECLARE_WAITQUEUE(name, tsk)					\
Mel Gorman 60bfe9
-	wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk)
Mel Gorman 60bfe9
+	wait_queue_entry_t name = __WAITQUEUE_INITIALIZER(name, tsk)
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 #define __WAIT_QUEUE_HEAD_INITIALIZER(name) {				\
Mel Gorman 60bfe9
 	.lock		= __SPIN_LOCK_UNLOCKED(name.lock),		\
Michal Marek f1645f
@@ -88,7 +91,7 @@ extern void __init_waitqueue_head(wait_q
Mel Gorman 60bfe9
 # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name)
Mel Gorman 60bfe9
 #endif
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
Mel Gorman 60bfe9
+static inline void init_waitqueue_entry(wait_queue_entry_t *q, struct task_struct *p)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	q->flags	= 0;
Mel Gorman 60bfe9
 	q->private	= p;
Michal Marek f1645f
@@ -96,7 +99,7 @@ static inline void init_waitqueue_entry(
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline void
Mel Gorman 60bfe9
-init_waitqueue_func_entry(wait_queue_t *q, wait_queue_func_t func)
Mel Gorman 60bfe9
+init_waitqueue_func_entry(wait_queue_entry_t *q, wait_queue_func_t func)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	q->flags	= 0;
Mel Gorman 60bfe9
 	q->private	= NULL;
Michal Marek f1645f
@@ -159,11 +162,11 @@ static inline bool wq_has_sleeper(wait_q
Mel Gorman 60bfe9
 	return waitqueue_active(wq);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
Mel Gorman 60bfe9
-extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait);
Mel Gorman 60bfe9
-extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
Mel Gorman 60bfe9
+extern void add_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait);
Mel Gorman 60bfe9
+extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait);
Mel Gorman 60bfe9
+extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
Mel Gorman 60bfe9
+static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *new)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	list_add(&new->task_list, &head->task_list);
Mel Gorman 60bfe9
 }
Michal Marek f1645f
@@ -172,27 +175,27 @@ static inline void __add_wait_queue(wait
Mel Gorman 60bfe9
  * Used for wake-one threads:
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 static inline void
Mel Gorman 60bfe9
-__add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+__add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	wait->flags |= WQ_FLAG_EXCLUSIVE;
Mel Gorman 60bfe9
 	__add_wait_queue(q, wait);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static inline void __add_wait_queue_tail(wait_queue_head_t *head,
Mel Gorman 60bfe9
-					 wait_queue_t *new)
Mel Gorman 60bfe9
+static inline void __add_wait_queue_entry_tail(wait_queue_head_t *head,
Mel Gorman 60bfe9
+					 wait_queue_entry_t *new)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	list_add_tail(&new->task_list, &head->task_list);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline void
Mel Gorman 60bfe9
-__add_wait_queue_tail_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+__add_wait_queue_entry_tail_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	wait->flags |= WQ_FLAG_EXCLUSIVE;
Mel Gorman 60bfe9
-	__add_wait_queue_tail(q, wait);
Mel Gorman 60bfe9
+	__add_wait_queue_entry_tail(q, wait);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline void
Mel Gorman 60bfe9
-__remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old)
Mel Gorman 60bfe9
+__remove_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *old)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	list_del(&old->task_list);
Mel Gorman 60bfe9
 }
Michal Marek f1645f
@@ -249,7 +252,7 @@ wait_queue_head_t *bit_waitqueue(void *,
Mel Gorman 60bfe9
 	(!__builtin_constant_p(state) ||				\
Mel Gorman 60bfe9
 		state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE)	\
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-extern void init_wait_entry(wait_queue_t *__wait, int flags);
Mel Gorman 60bfe9
+extern void init_wait_entry(wait_queue_entry_t *__wait, int flags);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
  * The below macro ___wait_event() has an explicit shadow of the __ret
Michal Marek f1645f
@@ -266,7 +269,7 @@ extern void init_wait_entry(wait_queue_t
Mel Gorman 60bfe9
 #define ___wait_event(wq, condition, state, exclusive, ret, cmd)	\
Mel Gorman 60bfe9
 ({									\
Mel Gorman 60bfe9
 	__label__ __out;						\
Mel Gorman 60bfe9
-	wait_queue_t __wait;						\
Mel Gorman 60bfe9
+	wait_queue_entry_t __wait;						\
Mel Gorman 60bfe9
 	long __ret = ret;	/* explicit shadow */			\
Mel Gorman 60bfe9
 									\
Mel Gorman 60bfe9
 	init_wait_entry(&__wait, exclusive ? WQ_FLAG_EXCLUSIVE : 0);	\
Mel Gorman 60bfe9
@@ -620,8 +623,8 @@ do {									\
Mel Gorman 60bfe9
 	__ret;								\
Mel Gorman 60bfe9
 })
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-extern int do_wait_intr(wait_queue_head_t *, wait_queue_t *);
Mel Gorman 60bfe9
-extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_t *);
Mel Gorman 60bfe9
+extern int do_wait_intr(wait_queue_head_t *, wait_queue_entry_t *);
Mel Gorman 60bfe9
+extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 #define __wait_event_interruptible_locked(wq, condition, exclusive, fn) \
Mel Gorman 60bfe9
 ({									\
Mel Gorman 60bfe9
@@ -967,17 +970,17 @@ do {									\
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
  * Waitqueues which are removed from the waitqueue_head at wakeup time
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
Mel Gorman 60bfe9
-void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
Mel Gorman 60bfe9
-long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_t *wait, int state);
Mel Gorman 60bfe9
-void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
Mel Gorman 60bfe9
-long wait_woken(wait_queue_t *wait, unsigned mode, long timeout);
Mel Gorman 60bfe9
-int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
-int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
-int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
+void prepare_to_wait(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
Mel Gorman 60bfe9
+void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
Mel Gorman 60bfe9
+long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
Mel Gorman 60bfe9
+void finish_wait(wait_queue_head_t *q, wait_queue_entry_t *wait);
Mel Gorman 60bfe9
+long wait_woken(wait_queue_entry_t *wait, unsigned mode, long timeout);
Mel Gorman 60bfe9
+int woken_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
+int autoremove_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
+int wake_bit_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 #define DEFINE_WAIT_FUNC(name, function)				\
Mel Gorman 60bfe9
-	wait_queue_t name = {						\
Mel Gorman 60bfe9
+	wait_queue_entry_t name = {					\
Mel Gorman 60bfe9
 		.private	= current,				\
Mel Gorman 60bfe9
 		.func		= function,				\
Mel Gorman 60bfe9
 		.task_list	= LIST_HEAD_INIT((name).task_list),	\
Mel Gorman 60bfe9
--- a/include/net/af_unix.h
Mel Gorman 60bfe9
+++ b/include/net/af_unix.h
Mel Gorman 60bfe9
@@ -62,7 +62,7 @@ struct unix_sock {
Mel Gorman 60bfe9
 #define UNIX_GC_CANDIDATE	0
Mel Gorman 60bfe9
 #define UNIX_GC_MAYBE_CYCLE	1
Mel Gorman 60bfe9
 	struct socket_wq	peer_wq;
Mel Gorman 60bfe9
-	wait_queue_t		peer_wake;
Mel Gorman 60bfe9
+	wait_queue_entry_t		peer_wake;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static inline struct unix_sock *unix_sk(const struct sock *sk)
Mel Gorman 60bfe9
--- a/include/uapi/linux/auto_fs.h
Mel Gorman 60bfe9
+++ b/include/uapi/linux/auto_fs.h
Mel Gorman 60bfe9
@@ -26,7 +26,7 @@
Mel Gorman 60bfe9
 #define AUTOFS_MIN_PROTO_VERSION	AUTOFS_PROTO_VERSION
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 /*
Mel Gorman 60bfe9
- * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
Mel Gorman 60bfe9
+ * The wait_queue_entry_token (autofs_wqt_t) is part of a structure which is passed
Mel Gorman 60bfe9
  * back to the kernel via ioctl from userspace. On architectures where 32- and
Mel Gorman 60bfe9
  * 64-bit userspace binaries can be executed it's important that the size of
Mel Gorman 60bfe9
  * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
Mel Gorman 60bfe9
@@ -49,7 +49,7 @@ struct autofs_packet_hdr {
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct autofs_packet_missing {
Mel Gorman 60bfe9
 	struct autofs_packet_hdr hdr;
Mel Gorman 60bfe9
-	autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+	autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
 	int len;
Mel Gorman 60bfe9
 	char name[NAME_MAX+1];
Mel Gorman 60bfe9
 };	
Mel Gorman 60bfe9
--- a/include/uapi/linux/auto_fs4.h
Mel Gorman 60bfe9
+++ b/include/uapi/linux/auto_fs4.h
Mel Gorman 60bfe9
@@ -108,7 +108,7 @@ enum autofs_notify {
Mel Gorman 60bfe9
 /* v4 multi expire (via pipe) */
Mel Gorman 60bfe9
 struct autofs_packet_expire_multi {
Mel Gorman 60bfe9
 	struct autofs_packet_hdr hdr;
Mel Gorman 60bfe9
-	autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+	autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
 	int len;
Mel Gorman 60bfe9
 	char name[NAME_MAX+1];
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
@@ -123,7 +123,7 @@ union autofs_packet_union {
Mel Gorman 60bfe9
 /* autofs v5 common packet struct */
Mel Gorman 60bfe9
 struct autofs_v5_packet {
Mel Gorman 60bfe9
 	struct autofs_packet_hdr hdr;
Mel Gorman 60bfe9
-	autofs_wqt_t wait_queue_token;
Mel Gorman 60bfe9
+	autofs_wqt_t wait_queue_entry_token;
Mel Gorman 60bfe9
 	__u32 dev;
Mel Gorman 60bfe9
 	__u64 ino;
Mel Gorman 60bfe9
 	__u32 uid;
Mel Gorman 60bfe9
--- a/kernel/exit.c
Mel Gorman 60bfe9
+++ b/kernel/exit.c
Mel Gorman 60bfe9
@@ -1004,7 +1004,7 @@ struct wait_opts {
Mel Gorman 60bfe9
 	int __user		*wo_stat;
Mel Gorman 60bfe9
 	struct rusage __user	*wo_rusage;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-	wait_queue_t		child_wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t		child_wait;
Mel Gorman 60bfe9
 	int			notask_error;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -1541,7 +1541,7 @@ static int ptrace_do_wait(struct wait_op
Mel Gorman 60bfe9
 	return 0;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int child_wait_callback(wait_queue_t *wait, unsigned mode,
Mel Gorman 60bfe9
+static int child_wait_callback(wait_queue_entry_t *wait, unsigned mode,
Mel Gorman 60bfe9
 				int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct wait_opts *wo = container_of(wait, struct wait_opts,
Mel Gorman 60bfe9
--- a/kernel/futex.c
Mel Gorman 60bfe9
+++ b/kernel/futex.c
Mel Gorman 60bfe9
@@ -225,7 +225,7 @@ struct futex_pi_state {
Mel Gorman 60bfe9
  * @requeue_pi_key:	the requeue_pi target futex key
Mel Gorman 60bfe9
  * @bitset:		bitset for the optional bitmasked wakeup
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
- * We use this hashed waitqueue, instead of a normal wait_queue_t, so
Mel Gorman 60bfe9
+ * We use this hashed waitqueue, instead of a normal wait_queue_entry_t, so
Mel Gorman 60bfe9
  * we can wake only the relevant ones (hashed queues may be shared).
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
  * A futex_q has a woken state, just like tasks have TASK_RUNNING.
Mel Gorman 60bfe9
--- a/kernel/sched/completion.c
Mel Gorman 60bfe9
+++ b/kernel/sched/completion.c
Mel Gorman 60bfe9
@@ -66,7 +66,7 @@ do_wait_for_common(struct completion *x,
Mel Gorman 60bfe9
 	if (!x->done) {
Mel Gorman 60bfe9
 		DECLARE_WAITQUEUE(wait, current);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-		__add_wait_queue_tail_exclusive(&x->wait, &wait);
Mel Gorman 60bfe9
+		__add_wait_queue_entry_tail_exclusive(&x->wait, &wait);
Mel Gorman 60bfe9
 		do {
Mel Gorman 60bfe9
 			if (signal_pending_state(state, current)) {
Mel Gorman 60bfe9
 				timeout = -ERESTARTSYS;
Mel Gorman 60bfe9
--- a/kernel/sched/core.c
Mel Gorman 60bfe9
+++ b/kernel/sched/core.c
Michal Marek f1645f
@@ -3695,7 +3695,7 @@ asmlinkage __visible void __sched preemp
Mel Gorman 60bfe9
 	exception_exit(prev_state);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int default_wake_function(wait_queue_t *curr, unsigned mode, int wake_flags,
Mel Gorman 60bfe9
+int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
Mel Gorman 60bfe9
 			  void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	return try_to_wake_up(curr->private, mode, wake_flags);
Mel Gorman 60bfe9
--- a/kernel/sched/wait.c
Mel Gorman 60bfe9
+++ b/kernel/sched/wait.c
Michal Marek f1645f
@@ -21,7 +21,7 @@ void __init_waitqueue_head(wait_queue_he
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 EXPORT_SYMBOL(__init_waitqueue_head);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+void add_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -32,18 +32,18 @@ void add_wait_queue(wait_queue_head_t *q
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(add_wait_queue);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	wait->flags |= WQ_FLAG_EXCLUSIVE;
Mel Gorman 60bfe9
 	spin_lock_irqsave(&q->lock, flags);
Mel Gorman 60bfe9
-	__add_wait_queue_tail(q, wait);
Mel Gorman 60bfe9
+	__add_wait_queue_entry_tail(q, wait);
Mel Gorman 60bfe9
 	spin_unlock_irqrestore(&q->lock, flags);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(add_wait_queue_exclusive);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+void remove_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
@@ -66,7 +66,7 @@ EXPORT_SYMBOL(remove_wait_queue);
Mel Gorman 60bfe9
 static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
Mel Gorman 60bfe9
 			int nr_exclusive, int wake_flags, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t *curr, *next;
Mel Gorman 60bfe9
+	wait_queue_entry_t *curr, *next;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	list_for_each_entry_safe(curr, next, &q->task_list, task_list) {
Mel Gorman 60bfe9
 		unsigned flags = curr->flags;
Michal Marek f1645f
@@ -171,7 +171,7 @@ EXPORT_SYMBOL_GPL(__wake_up_sync);	/* Fo
Mel Gorman 60bfe9
  * loads to move into the critical region).
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 void
Mel Gorman 60bfe9
-prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)
Mel Gorman 60bfe9
+prepare_to_wait(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -185,20 +185,20 @@ prepare_to_wait(wait_queue_head_t *q, wa
Mel Gorman 60bfe9
 EXPORT_SYMBOL(prepare_to_wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 void
Mel Gorman 60bfe9
-prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state)
Mel Gorman 60bfe9
+prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	wait->flags |= WQ_FLAG_EXCLUSIVE;
Mel Gorman 60bfe9
 	spin_lock_irqsave(&q->lock, flags);
Mel Gorman 60bfe9
 	if (list_empty(&wait->task_list))
Mel Gorman 60bfe9
-		__add_wait_queue_tail(q, wait);
Mel Gorman 60bfe9
+		__add_wait_queue_entry_tail(q, wait);
Mel Gorman 60bfe9
 	set_current_state(state);
Mel Gorman 60bfe9
 	spin_unlock_irqrestore(&q->lock, flags);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(prepare_to_wait_exclusive);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-void init_wait_entry(wait_queue_t *wait, int flags)
Mel Gorman 60bfe9
+void init_wait_entry(wait_queue_entry_t *wait, int flags)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	wait->flags = flags;
Mel Gorman 60bfe9
 	wait->private = current;
Michal Marek f1645f
@@ -207,7 +207,7 @@ void init_wait_entry(wait_queue_t *wait,
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(init_wait_entry);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_t *wait, int state)
Mel Gorman 60bfe9
+long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	long ret = 0;
Michal Marek f1645f
@@ -231,7 +231,7 @@ long prepare_to_wait_event(wait_queue_he
Mel Gorman 60bfe9
 	} else {
Mel Gorman 60bfe9
 		if (list_empty(&wait->task_list)) {
Mel Gorman 60bfe9
 			if (wait->flags & WQ_FLAG_EXCLUSIVE)
Mel Gorman 60bfe9
-				__add_wait_queue_tail(q, wait);
Mel Gorman 60bfe9
+				__add_wait_queue_entry_tail(q, wait);
Mel Gorman 60bfe9
 			else
Mel Gorman 60bfe9
 				__add_wait_queue(q, wait);
Mel Gorman 60bfe9
 		}
Mel Gorman 60bfe9
@@ -250,10 +250,10 @@ EXPORT_SYMBOL(prepare_to_wait_event);
Mel Gorman 60bfe9
  * condition in the caller before they add the wait
Mel Gorman 60bfe9
  * entry to the wake queue.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-int do_wait_intr(wait_queue_head_t *wq, wait_queue_t *wait)
Mel Gorman 60bfe9
+int do_wait_intr(wait_queue_head_t *wq, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	if (likely(list_empty(&wait->task_list)))
Mel Gorman 60bfe9
-		__add_wait_queue_tail(wq, wait);
Mel Gorman 60bfe9
+		__add_wait_queue_entry_tail(wq, wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	set_current_state(TASK_INTERRUPTIBLE);
Mel Gorman 60bfe9
 	if (signal_pending(current))
Michal Marek f1645f
@@ -266,10 +266,10 @@ int do_wait_intr(wait_queue_head_t *wq,
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(do_wait_intr);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int do_wait_intr_irq(wait_queue_head_t *wq, wait_queue_t *wait)
Mel Gorman 60bfe9
+int do_wait_intr_irq(wait_queue_head_t *wq, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	if (likely(list_empty(&wait->task_list)))
Mel Gorman 60bfe9
-		__add_wait_queue_tail(wq, wait);
Mel Gorman 60bfe9
+		__add_wait_queue_entry_tail(wq, wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	set_current_state(TASK_INTERRUPTIBLE);
Mel Gorman 60bfe9
 	if (signal_pending(current))
Mel Gorman 60bfe9
@@ -291,7 +291,7 @@ EXPORT_SYMBOL(do_wait_intr_irq);
Mel Gorman 60bfe9
  * the wait descriptor from the given waitqueue if still
Mel Gorman 60bfe9
  * queued.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
Mel Gorman 60bfe9
+void finish_wait(wait_queue_head_t *q, wait_queue_entry_t *wait)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -317,7 +317,7 @@ void finish_wait(wait_queue_head_t *q, w
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(finish_wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+int autoremove_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int ret = default_wake_function(wait, mode, sync, key);
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -352,7 +352,7 @@ static inline bool is_kthread_should_sto
Mel Gorman 60bfe9
  * remove_wait_queue(&wq, &wait);
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-long wait_woken(wait_queue_t *wait, unsigned mode, long timeout)
Mel Gorman 60bfe9
+long wait_woken(wait_queue_entry_t *wait, unsigned mode, long timeout)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	set_current_state(mode); /* A */
Mel Gorman 60bfe9
 	/*
Michal Marek f1645f
@@ -376,7 +376,7 @@ long wait_woken(wait_queue_t *wait, unsi
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(wait_woken);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+int woken_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	/*
Mel Gorman 60bfe9
 	 * Although this function is called under waitqueue lock, LOCK
Michal Marek f1645f
@@ -392,7 +392,7 @@ int woken_wake_function(wait_queue_t *wa
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 EXPORT_SYMBOL(woken_wake_function);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *arg)
Mel Gorman 60bfe9
+int wake_bit_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct wait_bit_key *key = arg;
Mel Gorman 60bfe9
 	struct wait_bit_queue *wait_bit
Michal Marek f1645f
@@ -535,7 +535,7 @@ static inline wait_queue_head_t *atomic_
Mel Gorman 60bfe9
 	return bit_waitqueue(p, 0);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int wake_atomic_t_function(wait_queue_t *wait, unsigned mode, int sync,
Mel Gorman 60bfe9
+static int wake_atomic_t_function(wait_queue_entry_t *wait, unsigned mode, int sync,
Mel Gorman 60bfe9
 				  void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct wait_bit_key *key = arg;
Mel Gorman 60bfe9
--- a/kernel/workqueue.c
Mel Gorman 60bfe9
+++ b/kernel/workqueue.c
Michal Marek f1645f
@@ -2864,11 +2864,11 @@ bool flush_work(struct work_struct *work
Mel Gorman 60bfe9
 EXPORT_SYMBOL_GPL(flush_work);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct cwt_wait {
Mel Gorman 60bfe9
-	wait_queue_t		wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t		wait;
Mel Gorman 60bfe9
 	struct work_struct	*work;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int cwt_wakefn(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int cwt_wakefn(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct cwt_wait *cwait = container_of(wait, struct cwt_wait, wait);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
--- a/mm/filemap.c
Mel Gorman 60bfe9
+++ b/mm/filemap.c
Mel Gorman 60bfe9
@@ -801,10 +801,10 @@ struct wait_page_key {
Mel Gorman 60bfe9
 struct wait_page_queue {
Mel Gorman 60bfe9
 	struct page *page;
Mel Gorman 60bfe9
 	int bit_nr;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void *arg)
Mel Gorman 60bfe9
+static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct wait_page_key *key = arg;
Mel Gorman 60bfe9
 	struct wait_page_queue *wait_page
Michal Marek f1645f
@@ -869,7 +869,7 @@ static inline int wait_on_page_bit_commo
Mel Gorman 60bfe9
 		struct page *page, int bit_nr, int state, bool lock)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct wait_page_queue wait_page;
Mel Gorman 60bfe9
-	wait_queue_t *wait = &wait_page.wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t *wait = &wait_page.wait;
Mel Gorman 60bfe9
 	int ret = 0;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	init_wait(wait);
Michal Marek f1645f
@@ -882,7 +882,7 @@ static inline int wait_on_page_bit_commo
Mel Gorman 60bfe9
 		spin_lock_irq(&q->lock);
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 		if (likely(list_empty(&wait->task_list))) {
Mel Gorman 60bfe9
-			__add_wait_queue_tail(q, wait);
Mel Gorman 60bfe9
+			__add_wait_queue_entry_tail(q, wait);
Mel Gorman 60bfe9
 			SetPageWaiters(page);
Mel Gorman 60bfe9
 		}
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -941,7 +941,7 @@ int wait_on_page_bit_killable(struct pag
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
  * Add an arbitrary @waiter to the wait queue for the nominated @page.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-void add_page_wait_queue(struct page *page, wait_queue_t *waiter)
Mel Gorman 60bfe9
+void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	wait_queue_head_t *q = page_waitqueue(page);
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
--- a/mm/memcontrol.c
Mel Gorman 60bfe9
+++ b/mm/memcontrol.c
Michal Marek f1645f
@@ -170,7 +170,7 @@ struct mem_cgroup_event {
Mel Gorman 60bfe9
 	 */
Mel Gorman 60bfe9
 	poll_table pt;
Mel Gorman 60bfe9
 	wait_queue_head_t *wqh;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	struct work_struct remove;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -1479,10 +1479,10 @@ static DECLARE_WAIT_QUEUE_HEAD(memcg_oom
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct oom_wait_info {
Mel Gorman 60bfe9
 	struct mem_cgroup *memcg;
Mel Gorman 60bfe9
-	wait_queue_t	wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t	wait;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int memcg_oom_wake_function(wait_queue_t *wait,
Mel Gorman 60bfe9
+static int memcg_oom_wake_function(wait_queue_entry_t *wait,
Mel Gorman 60bfe9
 	unsigned mode, int sync, void *arg)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct mem_cgroup *wake_memcg = (struct mem_cgroup *)arg;
Michal Marek f1645f
@@ -3729,7 +3729,7 @@ static void memcg_event_remove(struct wo
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
  * Called with wqh->lock held and interrupts disabled.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-static int memcg_event_wake(wait_queue_t *wait, unsigned mode,
Mel Gorman 60bfe9
+static int memcg_event_wake(wait_queue_entry_t *wait, unsigned mode,
Mel Gorman 60bfe9
 			    int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct mem_cgroup_event *event =
Mel Gorman 60bfe9
--- a/mm/mempool.c
Mel Gorman 60bfe9
+++ b/mm/mempool.c
Michal Marek f1645f
@@ -312,7 +312,7 @@ void *mempool_alloc(mempool_t *pool, gfp
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	void *element;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	gfp_t gfp_temp;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	VM_WARN_ON_ONCE(gfp_mask & __GFP_ZERO);
Mel Gorman 60bfe9
--- a/mm/shmem.c
Mel Gorman 60bfe9
+++ b/mm/shmem.c
Michal Marek f1645f
@@ -1910,7 +1910,7 @@ unlock:
Mel Gorman 60bfe9
  * entry unconditionally - even if something else had already woken the
Mel Gorman 60bfe9
  * target.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
-static int synchronous_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+static int synchronous_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int ret = default_wake_function(wait, mode, sync, key);
Mel Gorman 60bfe9
 	list_del_init(&wait->task_list);
Mel Gorman 60bfe9
--- a/net/9p/trans_fd.c
Mel Gorman 60bfe9
+++ b/net/9p/trans_fd.c
Mel Gorman 60bfe9
@@ -95,7 +95,7 @@ enum {
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 struct p9_poll_wait {
Mel Gorman 60bfe9
 	struct p9_conn *conn;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	wait_queue_head_t *wait_addr;
Mel Gorman 60bfe9
 };
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -522,7 +522,7 @@ error:
Mel Gorman 60bfe9
 	clear_bit(Wworksched, &m->wsched);
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int p9_pollwake(wait_queue_t *wait, unsigned int mode, int sync, void *key)
Mel Gorman 60bfe9
+static int p9_pollwake(wait_queue_entry_t *wait, unsigned int mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct p9_poll_wait *pwait =
Mel Gorman 60bfe9
 		container_of(wait, struct p9_poll_wait, wait);
Mel Gorman 60bfe9
--- a/net/bluetooth/hidp/core.c
Mel Gorman 60bfe9
+++ b/net/bluetooth/hidp/core.c
Michal Marek f1645f
@@ -1238,7 +1238,7 @@ static void hidp_session_run(struct hidp
Michal Marek f1645f
 	smp_mb__after_atomic();
Michal Marek f1645f
 }
Mel Gorman 60bfe9
 
Michal Marek f1645f
-static int hidp_session_wake_function(wait_queue_t *wait,
Michal Marek f1645f
+static int hidp_session_wake_function(wait_queue_entry_t *wait,
Michal Marek f1645f
 				      unsigned int mode,
Michal Marek f1645f
 				      int sync, void *key)
Michal Marek f1645f
 {
Mel Gorman 60bfe9
--- a/net/core/datagram.c
Mel Gorman 60bfe9
+++ b/net/core/datagram.c
Michal Marek f1645f
@@ -68,7 +68,7 @@ static inline int connection_based(struc
Mel Gorman 60bfe9
 	return sk->sk_type == SOCK_SEQPACKET || sk->sk_type == SOCK_STREAM;
Mel Gorman 60bfe9
 }
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int receiver_wake_function(wait_queue_t *wait, unsigned int mode, int sync,
Mel Gorman 60bfe9
+static int receiver_wake_function(wait_queue_entry_t *wait, unsigned int mode, int sync,
Mel Gorman 60bfe9
 				  void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	unsigned long bits = (unsigned long)key;
Mel Gorman 60bfe9
--- a/net/unix/af_unix.c
Mel Gorman 60bfe9
+++ b/net/unix/af_unix.c
Michal Marek f1645f
@@ -343,7 +343,7 @@ found:
Mel Gorman 60bfe9
  * are still connected to it and there's no way to inform "a polling
Mel Gorman 60bfe9
  * implementation" that it should let go of a certain wait queue
Mel Gorman 60bfe9
  *
Mel Gorman 60bfe9
- * In order to propagate a wake up, a wait_queue_t of the client
Mel Gorman 60bfe9
+ * In order to propagate a wake up, a wait_queue_entry_t of the client
Mel Gorman 60bfe9
  * socket is enqueued on the peer_wait queue of the server socket
Mel Gorman 60bfe9
  * whose wake function does a wake_up on the ordinary client socket
Mel Gorman 60bfe9
  * wait queue. This connection is established whenever a write (or
Michal Marek f1645f
@@ -352,7 +352,7 @@ found:
Mel Gorman 60bfe9
  * was relayed.
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
-static int unix_dgram_peer_wake_relay(wait_queue_t *q, unsigned mode, int flags,
Mel Gorman 60bfe9
+static int unix_dgram_peer_wake_relay(wait_queue_entry_t *q, unsigned mode, int flags,
Mel Gorman 60bfe9
 				      void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct unix_sock *u;
Mel Gorman 60bfe9
--- a/sound/core/control.c
Mel Gorman 60bfe9
+++ b/sound/core/control.c
Michal Marek f1645f
@@ -1577,7 +1577,7 @@ static ssize_t snd_ctl_read(struct file
Mel Gorman 60bfe9
 		struct snd_ctl_event ev;
Mel Gorman 60bfe9
 		struct snd_kctl_event *kev;
Mel Gorman 60bfe9
 		while (list_empty(&ctl->events)) {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 			if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
Mel Gorman 60bfe9
 				err = -EAGAIN;
Mel Gorman 60bfe9
 				goto __end_lock;
Mel Gorman 60bfe9
--- a/sound/core/hwdep.c
Mel Gorman 60bfe9
+++ b/sound/core/hwdep.c
Michal Marek f1645f
@@ -85,7 +85,7 @@ static int snd_hwdep_open(struct inode *
Mel Gorman 60bfe9
 	int major = imajor(inode);
Mel Gorman 60bfe9
 	struct snd_hwdep *hw;
Mel Gorman 60bfe9
 	int err;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (major == snd_major) {
Mel Gorman 60bfe9
 		hw = snd_lookup_minor_data(iminor(inode),
Mel Gorman 60bfe9
--- a/sound/core/init.c
Mel Gorman 60bfe9
+++ b/sound/core/init.c
Mel Gorman 60bfe9
@@ -989,7 +989,7 @@ EXPORT_SYMBOL(snd_card_file_remove);
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 int snd_power_wait(struct snd_card *card, unsigned int power_state)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int result = 0;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	/* fastpath */
Mel Gorman 60bfe9
--- a/sound/core/oss/pcm_oss.c
Mel Gorman 60bfe9
+++ b/sound/core/oss/pcm_oss.c
Michal Marek f1645f
@@ -1554,7 +1554,7 @@ static int snd_pcm_oss_sync1(struct snd_
Mel Gorman 60bfe9
 	ssize_t result = 0;
Mel Gorman 60bfe9
 	snd_pcm_state_t state;
Mel Gorman 60bfe9
 	long res;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	runtime = substream->runtime;
Mel Gorman 60bfe9
 	init_waitqueue_entry(&wait, current);
Michal Marek f1645f
@@ -2387,7 +2387,7 @@ static int snd_pcm_oss_open(struct inode
Mel Gorman 60bfe9
 	struct snd_pcm_oss_file *pcm_oss_file;
Mel Gorman 60bfe9
 	struct snd_pcm_oss_setup setup[2];
Mel Gorman 60bfe9
 	int nonblock;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	err = nonseekable_open(inode, file);
Mel Gorman 60bfe9
 	if (err < 0)
Mel Gorman 60bfe9
--- a/sound/core/pcm_lib.c
Mel Gorman 60bfe9
+++ b/sound/core/pcm_lib.c
Michal Marek f1645f
@@ -1904,7 +1904,7 @@ static int wait_for_avail(struct snd_pcm
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct snd_pcm_runtime *runtime = substream->runtime;
Mel Gorman 60bfe9
 	int is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int err = 0;
Mel Gorman 60bfe9
 	snd_pcm_uframes_t avail = 0;
Mel Gorman 60bfe9
 	long wait_time, tout;
Mel Gorman 60bfe9
--- a/sound/core/pcm_native.c
Mel Gorman 60bfe9
+++ b/sound/core/pcm_native.c
Michal Marek f1645f
@@ -1652,7 +1652,7 @@ static int snd_pcm_drain(struct snd_pcm_
Mel Gorman 60bfe9
 	struct snd_card *card;
Mel Gorman 60bfe9
 	struct snd_pcm_runtime *runtime;
Mel Gorman 60bfe9
 	struct snd_pcm_substream *s;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int result = 0;
Mel Gorman 60bfe9
 	int nonblock = 0;
Mel Gorman 60bfe9
 
Michal Marek f1645f
@@ -2353,7 +2353,7 @@ static int snd_pcm_capture_open(struct i
Mel Gorman 60bfe9
 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int err;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (pcm == NULL) {
Mel Gorman 60bfe9
 		err = -ENODEV;
Mel Gorman 60bfe9
--- a/sound/core/rawmidi.c
Mel Gorman 60bfe9
+++ b/sound/core/rawmidi.c
Michal Marek f1645f
@@ -368,7 +368,7 @@ static int snd_rawmidi_open(struct inode
Mel Gorman 60bfe9
 	int err;
Mel Gorman 60bfe9
 	struct snd_rawmidi *rmidi;
Mel Gorman 60bfe9
 	struct snd_rawmidi_file *rawmidi_file = NULL;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) 
Mel Gorman 60bfe9
 		return -EINVAL;		/* invalid combination */
Michal Marek f1645f
@@ -1002,7 +1002,7 @@ static ssize_t snd_rawmidi_read(struct f
Mel Gorman 60bfe9
 	while (count > 0) {
Mel Gorman 60bfe9
 		spin_lock_irq(&runtime->lock);
Mel Gorman 60bfe9
 		while (!snd_rawmidi_ready(substream)) {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 			if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
Mel Gorman 60bfe9
 				spin_unlock_irq(&runtime->lock);
Mel Gorman 60bfe9
 				return result > 0 ? result : -EAGAIN;
Michal Marek f1645f
@@ -1306,7 +1306,7 @@ static ssize_t snd_rawmidi_write(struct
Mel Gorman 60bfe9
 	while (count > 0) {
Mel Gorman 60bfe9
 		spin_lock_irq(&runtime->lock);
Mel Gorman 60bfe9
 		while (!snd_rawmidi_ready_append(substream, count)) {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 			if (file->f_flags & O_NONBLOCK) {
Mel Gorman 60bfe9
 				spin_unlock_irq(&runtime->lock);
Mel Gorman 60bfe9
 				return result > 0 ? result : -EAGAIN;
Michal Marek f1645f
@@ -1338,7 +1338,7 @@ static ssize_t snd_rawmidi_write(struct
Mel Gorman 60bfe9
 	if (file->f_flags & O_DSYNC) {
Mel Gorman 60bfe9
 		spin_lock_irq(&runtime->lock);
Mel Gorman 60bfe9
 		while (runtime->avail != runtime->buffer_size) {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 			unsigned int last_avail = runtime->avail;
Mel Gorman 60bfe9
 			init_waitqueue_entry(&wait, current);
Mel Gorman 60bfe9
 			add_wait_queue(&runtime->sleep, &wait);
Mel Gorman 60bfe9
--- a/sound/core/seq/seq_fifo.c
Mel Gorman 60bfe9
+++ b/sound/core/seq/seq_fifo.c
Michal Marek f1645f
@@ -179,7 +179,7 @@ int snd_seq_fifo_cell_out(struct snd_seq
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct snd_seq_event_cell *cell;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (snd_BUG_ON(!f))
Mel Gorman 60bfe9
 		return -EINVAL;
Mel Gorman 60bfe9
--- a/sound/core/seq/seq_memory.c
Mel Gorman 60bfe9
+++ b/sound/core/seq/seq_memory.c
Michal Marek f1645f
@@ -227,7 +227,7 @@ static int snd_seq_cell_alloc(struct snd
Mel Gorman 60bfe9
 	struct snd_seq_event_cell *cell;
Mel Gorman 60bfe9
 	unsigned long flags;
Mel Gorman 60bfe9
 	int err = -EAGAIN;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (pool == NULL)
Mel Gorman 60bfe9
 		return -EINVAL;
Mel Gorman 60bfe9
--- a/sound/core/timer.c
Mel Gorman 60bfe9
+++ b/sound/core/timer.c
Michal Marek f1645f
@@ -1964,7 +1964,7 @@ static ssize_t snd_timer_user_read(struc
Mel Gorman 60bfe9
 	spin_lock_irq(&tu->qlock);
Mel Gorman 60bfe9
 	while ((long)count - result >= unit) {
Mel Gorman 60bfe9
 		while (!tu->qused) {
Mel Gorman 60bfe9
-			wait_queue_t wait;
Mel Gorman 60bfe9
+			wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 			if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
Mel Gorman 60bfe9
 				err = -EAGAIN;
Mel Gorman 60bfe9
--- a/sound/isa/wavefront/wavefront_synth.c
Mel Gorman 60bfe9
+++ b/sound/isa/wavefront/wavefront_synth.c
Michal Marek f1645f
@@ -1782,7 +1782,7 @@ wavefront_should_cause_interrupt (snd_wa
Mel Gorman 60bfe9
 				  int val, int port, unsigned long timeout)
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	init_waitqueue_entry(&wait, current);
Mel Gorman 60bfe9
 	spin_lock_irq(&dev->irq_lock);
Mel Gorman 60bfe9
--- a/sound/pci/mixart/mixart_core.c
Mel Gorman 60bfe9
+++ b/sound/pci/mixart/mixart_core.c
Michal Marek f1645f
@@ -239,7 +239,7 @@ int snd_mixart_send_msg(struct mixart_mg
Mel Gorman 60bfe9
 	struct mixart_msg resp;
Mel Gorman 60bfe9
 	u32 msg_frame = 0; /* set to 0, so it's no notification to wait for, but the answer */
Mel Gorman 60bfe9
 	int err;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	long timeout;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	init_waitqueue_entry(&wait, current);
Michal Marek f1645f
@@ -284,7 +284,7 @@ int snd_mixart_send_msg_wait_notif(struc
Mel Gorman 60bfe9
 				   struct mixart_msg *request, u32 notif_event)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	int err;
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	long timeout;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	if (snd_BUG_ON(!notif_event))
Mel Gorman 60bfe9
--- a/sound/pci/ymfpci/ymfpci_main.c
Mel Gorman 60bfe9
+++ b/sound/pci/ymfpci/ymfpci_main.c
Michal Marek f1645f
@@ -781,7 +781,7 @@ static snd_pcm_uframes_t snd_ymfpci_capt
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
-	wait_queue_t wait;
Mel Gorman 60bfe9
+	wait_queue_entry_t wait;
Mel Gorman 60bfe9
 	int loops = 4;
Mel Gorman 60bfe9
 
Mel Gorman 60bfe9
 	while (loops-- > 0) {
Mel Gorman 60bfe9
--- a/virt/kvm/eventfd.c
Mel Gorman 60bfe9
+++ b/virt/kvm/eventfd.c
Michal Marek f1645f
@@ -184,7 +184,7 @@ int __attribute__((weak)) kvm_arch_set_i
Mel Gorman 60bfe9
  * Called with wqh->lock held and interrupts disabled
Mel Gorman 60bfe9
  */
Mel Gorman 60bfe9
 static int
Mel Gorman 60bfe9
-irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
+irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
Mel Gorman 60bfe9
 {
Mel Gorman 60bfe9
 	struct kvm_kernel_irqfd *irqfd =
Mel Gorman 60bfe9
 		container_of(wait, struct kvm_kernel_irqfd, wait);