sched/wait: Rename wait_queue_t => wait_queue_entry_t
authorIngo Molnar <mingo@kernel.org>
Tue, 20 Jun 2017 10:06:13 +0000 (12:06 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Jun 2017 10:18:27 +0000 (12:18 +0200)
Rename:

wait_queue_t => wait_queue_entry_t

'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue",
but in reality it's a queue *entry*. The 'real' queue is the wait queue head,
which had to carry the name.

Start sorting this out by renaming it to 'wait_queue_entry_t'.

This also allows the real structure name 'struct __wait_queue' to
lose its double underscore and become 'struct wait_queue_entry',
which is the more canonical nomenclature for such data types.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
94 files changed:
Documentation/DocBook/kernel-hacking.tmpl
Documentation/filesystems/autofs4.txt
block/blk-mq.c
block/blk-wbt.c
block/kyber-iosched.c
drivers/bluetooth/btmrvl_main.c
drivers/char/ipmi/ipmi_watchdog.c
drivers/gpu/drm/i915/i915_gem_request.h
drivers/gpu/drm/i915/i915_sw_fence.c
drivers/gpu/drm/i915/i915_sw_fence.h
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/vga/vgaarb.c
drivers/infiniband/hw/i40iw/i40iw_main.c
drivers/md/bcache/btree.h
drivers/net/ethernet/cavium/liquidio/octeon_main.h
drivers/net/wireless/cisco/airo.c
drivers/net/wireless/intersil/hostap/hostap_ioctl.c
drivers/net/wireless/marvell/libertas/main.c
drivers/scsi/dpt/dpti_i2o.h
drivers/scsi/ips.c
drivers/scsi/ips.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/libcfs/debug.c
drivers/staging/lustre/lnet/libcfs/tracefile.c
drivers/staging/lustre/lnet/lnet/lib-eq.c
drivers/staging/lustre/lnet/lnet/lib-socket.c
drivers/staging/lustre/lustre/fid/fid_request.c
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/llite/lcommon_cl.c
drivers/staging/lustre/lustre/lov/lov_cl_internal.h
drivers/staging/lustre/lustre/lov/lov_object.c
drivers/staging/lustre/lustre/obdclass/lu_object.c
drivers/tty/synclink_gt.c
drivers/vfio/virqfd.c
drivers/vhost/vhost.c
drivers/vhost/vhost.h
fs/autofs4/autofs_i.h
fs/autofs4/waitq.c
fs/cachefiles/internal.h
fs/cachefiles/namei.c
fs/cachefiles/rdwr.c
fs/dax.c
fs/eventfd.c
fs/eventpoll.c
fs/fs_pin.c
fs/nfs/nfs4proc.c
fs/nilfs2/segment.c
fs/orangefs/orangefs-bufmap.c
fs/reiserfs/journal.c
fs/select.c
fs/signalfd.c
fs/userfaultfd.c
include/linux/blk-mq.h
include/linux/eventfd.h
include/linux/kvm_irqfd.h
include/linux/pagemap.h
include/linux/poll.h
include/linux/vfio.h
include/linux/wait.h
include/net/af_unix.h
include/uapi/linux/auto_fs.h
include/uapi/linux/auto_fs4.h
kernel/exit.c
kernel/futex.c
kernel/sched/completion.c
kernel/sched/core.c
kernel/sched/wait.c
kernel/workqueue.c
mm/filemap.c
mm/memcontrol.c
mm/mempool.c
mm/shmem.c
net/9p/trans_fd.c
net/bluetooth/bnep/core.c
net/bluetooth/cmtp/core.c
net/bluetooth/hidp/core.c
net/core/datagram.c
net/unix/af_unix.c
sound/core/control.c
sound/core/hwdep.c
sound/core/init.c
sound/core/oss/pcm_oss.c
sound/core/pcm_lib.c
sound/core/pcm_native.c
sound/core/rawmidi.c
sound/core/seq/seq_fifo.c
sound/core/seq/seq_memory.c
sound/core/timer.c
sound/isa/wavefront/wavefront_synth.c
sound/pci/mixart/mixart_core.c
sound/pci/ymfpci/ymfpci_main.c
virt/kvm/eventfd.c

index da5c087462b1dfd9374a1727dd7ee2a365b313a1..c3c70559153265671ab90fb78af69326d6b90c13 100644 (file)
@@ -819,7 +819,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
    certain condition is true.  They must be used carefully to ensure
    there is no race condition.  You declare a
    <type>wait_queue_head_t</type>, and then processes which want to
-   wait for that condition declare a <type>wait_queue_t</type>
+   wait for that condition declare a <type>wait_queue_entry_t</type>
    referring to themselves, and place that in the queue.
   </para>
 
index f10dd590f69fe3e9384ebf0b9d9ef87cd91f88e7..8444dc3d57e87555adfbc6f4d8e4b5e6c0415516 100644 (file)
@@ -316,7 +316,7 @@ For version 5, the format of the message is:
         struct autofs_v5_packet {
                 int proto_version;                /* Protocol version */
                 int type;                        /* Type of packet */
-                autofs_wqt_t wait_queue_token;
+                autofs_wqt_t wait_queue_entry_token;
                 __u32 dev;
                 __u64 ino;
                 __u32 uid;
@@ -341,12 +341,12 @@ The pipe will be set to "packet mode" (equivalent to passing
 `O_DIRECT`) to _pipe2(2)_ so that a read from the pipe will return at
 most one packet, and any unread portion of a packet will be discarded.
 
-The `wait_queue_token` is a unique number which can identify a
+The `wait_queue_entry_token` is a unique number which can identify a
 particular request to be acknowledged.  When a message is sent over
 the pipe the affected dentry is marked as either "active" or
 "expiring" and other accesses to it block until the message is
 acknowledged using one of the ioctls below and the relevant
-`wait_queue_token`.
+`wait_queue_entry_token`.
 
 Communicating with autofs: root directory ioctls
 ------------------------------------------------
@@ -358,7 +358,7 @@ capability, or must be the automount daemon.
 The available ioctl commands are:
 
 - **AUTOFS_IOC_READY**: a notification has been handled.  The argument
-    to the ioctl command is the "wait_queue_token" number
+    to the ioctl command is the "wait_queue_entry_token" number
     corresponding to the notification being acknowledged.
 - **AUTOFS_IOC_FAIL**: similar to above, but indicates failure with
     the error code `ENOENT`.
@@ -382,14 +382,14 @@ The available ioctl commands are:
         struct autofs_packet_expire_multi {
                 int proto_version;              /* Protocol version */
                 int type;                       /* Type of packet */
-                autofs_wqt_t wait_queue_token;
+                autofs_wqt_t wait_queue_entry_token;
                 int len;
                 char name[NAME_MAX+1];
         };
 
      is required.  This is filled in with the name of something
      that can be unmounted or removed.  If nothing can be expired,
-     `errno` is set to `EAGAIN`.  Even though a `wait_queue_token`
+     `errno` is set to `EAGAIN`.  Even though a `wait_queue_entry_token`
      is present in the structure, no "wait queue" is established
      and no acknowledgment is needed.
 - **AUTOFS_IOC_EXPIRE_MULTI**:  This is similar to
index bb66c96850b18cb419b0e44aab1894169352f9af..a083f95e04b1b6c0a4f9956e50a184c404d2bfea 100644 (file)
@@ -926,7 +926,7 @@ static bool reorder_tags_to_front(struct list_head *list)
        return first != NULL;
 }
 
-static int blk_mq_dispatch_wake(wait_queue_t *wait, unsigned mode, int flags,
+static int blk_mq_dispatch_wake(wait_queue_entry_t *wait, unsigned mode, int flags,
                                void *key)
 {
        struct blk_mq_hw_ctx *hctx;
index 17676f4d7fd157b2c889b093dd869866c2e468d1..5f3a37c2784c17c126b0e9022c73f6fd579b4835 100644 (file)
@@ -503,7 +503,7 @@ static inline unsigned int get_limit(struct rq_wb *rwb, unsigned long rw)
 }
 
 static inline bool may_queue(struct rq_wb *rwb, struct rq_wait *rqw,
-                            wait_queue_t *wait, unsigned long rw)
+                            wait_queue_entry_t *wait, unsigned long rw)
 {
        /*
         * inc it here even if disabled, since we'll dec it at completion.
index b9faabc75fdb031b4f9d7917b1f91aa8e4ba2c06..b95d6bd714c07f83c9a170410722bd54c67e9d34 100644 (file)
@@ -99,7 +99,7 @@ struct kyber_hctx_data {
        struct list_head rqs[KYBER_NUM_DOMAINS];
        unsigned int cur_domain;
        unsigned int batching;
-       wait_queue_t domain_wait[KYBER_NUM_DOMAINS];
+       wait_queue_entry_t domain_wait[KYBER_NUM_DOMAINS];
        atomic_t wait_index[KYBER_NUM_DOMAINS];
 };
 
@@ -507,7 +507,7 @@ static void kyber_flush_busy_ctxs(struct kyber_hctx_data *khd,
        }
 }
 
-static int kyber_domain_wake(wait_queue_t *wait, unsigned mode, int flags,
+static int kyber_domain_wake(wait_queue_entry_t *wait, unsigned mode, int flags,
                             void *key)
 {
        struct blk_mq_hw_ctx *hctx = READ_ONCE(wait->private);
@@ -523,7 +523,7 @@ static int kyber_get_domain_token(struct kyber_queue_data *kqd,
 {
        unsigned int sched_domain = khd->cur_domain;
        struct sbitmap_queue *domain_tokens = &kqd->domain_tokens[sched_domain];
-       wait_queue_t *wait = &khd->domain_wait[sched_domain];
+       wait_queue_entry_t *wait = &khd->domain_wait[sched_domain];
        struct sbq_wait_state *ws;
        int nr;
 
@@ -734,7 +734,7 @@ static int kyber_##name##_waiting_show(void *data, struct seq_file *m)      \
 {                                                                      \
        struct blk_mq_hw_ctx *hctx = data;                              \
        struct kyber_hctx_data *khd = hctx->sched_data;                 \
-       wait_queue_t *wait = &khd->domain_wait[domain];                 \
+       wait_queue_entry_t *wait = &khd->domain_wait[domain];           \
                                                                        \
        seq_printf(m, "%d\n", !list_empty_careful(&wait->task_list));   \
        return 0;                                                       \
index c38cb5b912913c9be380497f1223cf4007f1e865..fe850f0567cb236fc29d192caa9a5c6aa3866f7d 100644 (file)
@@ -602,7 +602,7 @@ static int btmrvl_service_main_thread(void *data)
        struct btmrvl_thread *thread = data;
        struct btmrvl_private *priv = thread->priv;
        struct btmrvl_adapter *adapter = priv->adapter;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct sk_buff *skb;
        ulong flags;
 
index d165af8abe36c7118f3ae602fec14d0f7230b965..a5c6cfe71a8eb4f7d15ad26a45d8a7372dcbdbb0 100644 (file)
@@ -821,7 +821,7 @@ static ssize_t ipmi_read(struct file *file,
                         loff_t      *ppos)
 {
        int          rv = 0;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (count <= 0)
                return 0;
index 129c58bb4805509ee708830458e766cfaa24237e..a4a920c4c4546f0bf50408f354b8b84cb9d52c8d 100644 (file)
@@ -123,7 +123,7 @@ struct drm_i915_gem_request {
         * It is used by the driver to then queue the request for execution.
         */
        struct i915_sw_fence submit;
-       wait_queue_t submitq;
+       wait_queue_entry_t submitq;
        wait_queue_head_t execute;
 
        /* A list of everyone we wait upon, and everyone who waits upon us.
index a277f8eb7beb8b5e12d5919275b63163a7ab2c5f..8669bfa33064c6c90b12d80a1aeb6b4a82a934ee 100644 (file)
@@ -152,7 +152,7 @@ static void __i915_sw_fence_wake_up_all(struct i915_sw_fence *fence,
                                        struct list_head *continuation)
 {
        wait_queue_head_t *x = &fence->wait;
-       wait_queue_t *pos, *next;
+       wait_queue_entry_t *pos, *next;
        unsigned long flags;
 
        debug_fence_deactivate(fence);
@@ -254,7 +254,7 @@ void i915_sw_fence_commit(struct i915_sw_fence *fence)
        __i915_sw_fence_commit(fence);
 }
 
-static int i915_sw_fence_wake(wait_queue_t *wq, unsigned mode, int flags, void *key)
+static int i915_sw_fence_wake(wait_queue_entry_t *wq, unsigned mode, int flags, void *key)
 {
        list_del(&wq->task_list);
        __i915_sw_fence_complete(wq->private, key);
@@ -267,7 +267,7 @@ static int i915_sw_fence_wake(wait_queue_t *wq, unsigned mode, int flags, void *
 static bool __i915_sw_fence_check_if_after(struct i915_sw_fence *fence,
                                    const struct i915_sw_fence * const signaler)
 {
-       wait_queue_t *wq;
+       wait_queue_entry_t *wq;
 
        if (__test_and_set_bit(I915_SW_FENCE_CHECKED_BIT, &fence->flags))
                return false;
@@ -288,7 +288,7 @@ static bool __i915_sw_fence_check_if_after(struct i915_sw_fence *fence,
 
 static void __i915_sw_fence_clear_checked_bit(struct i915_sw_fence *fence)
 {
-       wait_queue_t *wq;
+       wait_queue_entry_t *wq;
 
        if (!__test_and_clear_bit(I915_SW_FENCE_CHECKED_BIT, &fence->flags))
                return;
@@ -320,7 +320,7 @@ static bool i915_sw_fence_check_if_after(struct i915_sw_fence *fence,
 
 static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
                                          struct i915_sw_fence *signaler,
-                                         wait_queue_t *wq, gfp_t gfp)
+                                         wait_queue_entry_t *wq, gfp_t gfp)
 {
        unsigned long flags;
        int pending;
@@ -359,7 +359,7 @@ static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
 
        spin_lock_irqsave(&signaler->wait.lock, flags);
        if (likely(!i915_sw_fence_done(signaler))) {
-               __add_wait_queue_tail(&signaler->wait, wq);
+               __add_wait_queue_entry_tail(&signaler->wait, wq);
                pending = 1;
        } else {
                i915_sw_fence_wake(wq, 0, 0, NULL);
@@ -372,7 +372,7 @@ static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
 
 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
                                 struct i915_sw_fence *signaler,
-                                wait_queue_t *wq)
+                                wait_queue_entry_t *wq)
 {
        return __i915_sw_fence_await_sw_fence(fence, signaler, wq, 0);
 }
index d31cefbbcc0433528479ced3e987d890c11e57eb..fd3c3bf6c8b7652504f70d9626326eb70a73b961 100644 (file)
@@ -66,7 +66,7 @@ void i915_sw_fence_commit(struct i915_sw_fence *fence);
 
 int i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
                                 struct i915_sw_fence *after,
-                                wait_queue_t *wq);
+                                wait_queue_entry_t *wq);
 int i915_sw_fence_await_sw_fence_gfp(struct i915_sw_fence *fence,
                                     struct i915_sw_fence *after,
                                     gfp_t gfp);
index c1c8e2208a21b4fd045d309249051dd391a14ec1..e562a78510ffc25040a2df105c097a1c149d80a9 100644 (file)
@@ -375,7 +375,7 @@ struct radeon_fence {
        unsigned                ring;
        bool                    is_vm_update;
 
-       wait_queue_t            fence_wake;
+       wait_queue_entry_t              fence_wake;
 };
 
 int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
index ef09f0a637545370bf245d0b1d0ba8fff2090dc2..e86f2bd38410ed6c23bc8079c9cf3d6d04a1640c 100644 (file)
@@ -158,7 +158,7 @@ int radeon_fence_emit(struct radeon_device *rdev,
  * for the fence locking itself, so unlocked variants are used for
  * fence_signal, and remove_wait_queue.
  */
-static int radeon_fence_check_signaled(wait_queue_t *wait, unsigned mode, int flags, void *key)
+static int radeon_fence_check_signaled(wait_queue_entry_t *wait, unsigned mode, int flags, void *key)
 {
        struct radeon_fence *fence;
        u64 seq;
index 92f1452dad57f6e472c2f6e6be9313e5ab68d537..76875f6299b85579fcbc43fd0a033e916572748b 100644 (file)
@@ -417,7 +417,7 @@ int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible)
 {
        struct vga_device *vgadev, *conflict;
        unsigned long flags;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int rc = 0;
 
        vga_check_first_use();
index a3f18a22f5ed1787794031eb8a1765ab2804cdc4..e0f47cc2effc36ae40de18961348e6063ef0658b 100644 (file)
@@ -1939,7 +1939,7 @@ static int i40iw_virtchnl_receive(struct i40e_info *ldev,
 bool i40iw_vf_clear_to_send(struct i40iw_sc_dev *dev)
 {
        struct i40iw_device *iwdev;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        iwdev = dev->back_dev;
 
index 9b80417cd547f52c264c1b4b993f3ee2155405f2..73da1f5626cb85880f41c1e3cf8fcd9e5584001f 100644 (file)
@@ -207,7 +207,7 @@ void bkey_put(struct cache_set *c, struct bkey *k);
 
 struct btree_op {
        /* for waiting on btree reserve in btree_split() */
-       wait_queue_t            wait;
+       wait_queue_entry_t              wait;
 
        /* Btree level at which we start taking write locks */
        short                   lock;
index bed9ef17bc26b4526cf3c57dcb4823cdc2586491..7ccffbb0019eaab7cb96ea9d5b5c1425c054375e 100644 (file)
@@ -144,7 +144,7 @@ static inline int
 sleep_cond(wait_queue_head_t *wait_queue, int *condition)
 {
        int errno = 0;
-       wait_queue_t we;
+       wait_queue_entry_t we;
 
        init_waitqueue_entry(&we, current);
        add_wait_queue(wait_queue, &we);
@@ -171,7 +171,7 @@ sleep_timeout_cond(wait_queue_head_t *wait_queue,
                   int *condition,
                   int timeout)
 {
-       wait_queue_t we;
+       wait_queue_entry_t we;
 
        init_waitqueue_entry(&we, current);
        add_wait_queue(wait_queue, &we);
index 1b7e125a28e2e0cb9ab02aea1b4ca8dd8f2fc45f..6a13303af2b7f24a8c487da6e663fe517720d643 100644 (file)
@@ -3066,7 +3066,7 @@ static int airo_thread(void *data) {
                if (ai->jobs) {
                        locked = down_interruptible(&ai->sem);
                } else {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
 
                        init_waitqueue_entry(&wait, current);
                        add_wait_queue(&ai->thr_wait, &wait);
index b2c6b065b542932bbdb309ef301db203f7c675b5..ff153ce295399ed0fff8e1fc7ed1f0308d1fe426 100644 (file)
@@ -2544,7 +2544,7 @@ static int prism2_ioctl_priv_prism2_param(struct net_device *dev,
                        ret = -EINVAL;
                }
                if (local->iw_mode == IW_MODE_MASTER) {
-                       wait_queue_t __wait;
+                       wait_queue_entry_t __wait;
                        init_waitqueue_entry(&__wait, current);
                        add_wait_queue(&local->hostscan_wq, &__wait);
                        set_current_state(TASK_INTERRUPTIBLE);
index e3500203715cf6d1f42a7243460ad1878ca10c1d..dde065d0d5c174db547840db08b6ee11cd3e38c5 100644 (file)
@@ -453,7 +453,7 @@ static int lbs_thread(void *data)
 {
        struct net_device *dev = data;
        struct lbs_private *priv = dev->ml_priv;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        lbs_deb_enter(LBS_DEB_THREAD);
 
index bd9e31e16249a8b633976f3c01d261789544ecff..16fc380b551259bb6113aed69c00842d3f62cb4d 100644 (file)
@@ -48,7 +48,7 @@
 #include <linux/wait.h>
 typedef wait_queue_head_t adpt_wait_queue_head_t;
 #define ADPT_DECLARE_WAIT_QUEUE_HEAD(wait) DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait)
-typedef wait_queue_t adpt_wait_queue_t;
+typedef wait_queue_entry_t adpt_wait_queue_entry_t;
 
 /*
  * message structures
index 3419e1bcdff60407e94183959a065a5c482a9c09..67621308eb9caf3d28b0b47e35749316d30ed416 100644 (file)
@@ -301,13 +301,13 @@ static uint32_t ips_statupd_copperhead_memio(ips_ha_t *);
 static uint32_t ips_statupd_morpheus(ips_ha_t *);
 static ips_scb_t *ips_getscb(ips_ha_t *);
 static void ips_putq_scb_head(ips_scb_queue_t *, ips_scb_t *);
-static void ips_putq_wait_tail(ips_wait_queue_t *, struct scsi_cmnd *);
+static void ips_putq_wait_tail(ips_wait_queue_entry_t *, struct scsi_cmnd *);
 static void ips_putq_copp_tail(ips_copp_queue_t *,
                                      ips_copp_wait_item_t *);
 static ips_scb_t *ips_removeq_scb_head(ips_scb_queue_t *);
 static ips_scb_t *ips_removeq_scb(ips_scb_queue_t *, ips_scb_t *);
-static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_t *);
-static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_t *,
+static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_entry_t *);
+static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_entry_t *,
                                          struct scsi_cmnd *);
 static ips_copp_wait_item_t *ips_removeq_copp(ips_copp_queue_t *,
                                                     ips_copp_wait_item_t *);
@@ -2871,7 +2871,7 @@ ips_removeq_scb(ips_scb_queue_t * queue, ips_scb_t * item)
 /* ASSUMED to be called from within the HA lock                             */
 /*                                                                          */
 /****************************************************************************/
-static void ips_putq_wait_tail(ips_wait_queue_t *queue, struct scsi_cmnd *item)
+static void ips_putq_wait_tail(ips_wait_queue_entry_t *queue, struct scsi_cmnd *item)
 {
        METHOD_TRACE("ips_putq_wait_tail", 1);
 
@@ -2902,7 +2902,7 @@ static void ips_putq_wait_tail(ips_wait_queue_t *queue, struct scsi_cmnd *item)
 /* ASSUMED to be called from within the HA lock                             */
 /*                                                                          */
 /****************************************************************************/
-static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_t *queue)
+static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_entry_t *queue)
 {
        struct scsi_cmnd *item;
 
@@ -2936,7 +2936,7 @@ static struct scsi_cmnd *ips_removeq_wait_head(ips_wait_queue_t *queue)
 /* ASSUMED to be called from within the HA lock                             */
 /*                                                                          */
 /****************************************************************************/
-static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_t *queue,
+static struct scsi_cmnd *ips_removeq_wait(ips_wait_queue_entry_t *queue,
                                          struct scsi_cmnd *item)
 {
        struct scsi_cmnd *p;
index b782bb60baf0e8d49e64a34f518dd3fec5fcd6ed..366be3b2f9b49a8d42b95eb5b612f912e329dba4 100644 (file)
@@ -989,7 +989,7 @@ typedef struct ips_wait_queue {
        struct scsi_cmnd *head;
        struct scsi_cmnd *tail;
        int count;
-} ips_wait_queue_t;
+} ips_wait_queue_entry_t;
 
 typedef struct ips_copp_wait_item {
        struct scsi_cmnd *scsi_cmd;
@@ -1035,7 +1035,7 @@ typedef struct ips_ha {
    ips_stat_t         sp;                 /* Status packer pointer      */
    struct ips_scb    *scbs;               /* Array of all CCBS          */
    struct ips_scb    *scb_freelist;       /* SCB free list              */
-   ips_wait_queue_t   scb_waitlist;       /* Pending SCB list           */
+   ips_wait_queue_entry_t   scb_waitlist;       /* Pending SCB list           */
    ips_copp_queue_t   copp_waitlist;      /* Pending PT list            */
    ips_scb_queue_t    scb_activelist;     /* Active SCB list            */
    IPS_IO_CMD        *dummy;              /* dummy command              */
index 0db662d6abdddf6a5dd6e4599f8c43d2a757319d..85b242ec5f9b284442e3fffe136ced430d2dd862 100644 (file)
@@ -3267,7 +3267,7 @@ int
 kiblnd_connd(void *arg)
 {
        spinlock_t *lock = &kiblnd_data.kib_connd_lock;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        unsigned long flags;
        struct kib_conn *conn;
        int timeout;
@@ -3521,7 +3521,7 @@ kiblnd_scheduler(void *arg)
        long id = (long)arg;
        struct kib_sched_info *sched;
        struct kib_conn *conn;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        unsigned long flags;
        struct ib_wc wc;
        int did_something;
@@ -3656,7 +3656,7 @@ kiblnd_failover_thread(void *arg)
 {
        rwlock_t *glock = &kiblnd_data.kib_global_lock;
        struct kib_dev *dev;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        unsigned long flags;
        int rc;
 
index 3ed3b08c122c585878129e2dbd7271fea4a86a17..6b38d5a8fe92357eb52a0e1b26fe30378be51359 100644 (file)
@@ -2166,7 +2166,7 @@ ksocknal_connd(void *arg)
 {
        spinlock_t *connd_lock = &ksocknal_data.ksnd_connd_lock;
        struct ksock_connreq *cr;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int nloops = 0;
        int cons_retry = 0;
 
@@ -2554,7 +2554,7 @@ ksocknal_check_peer_timeouts(int idx)
 int
 ksocknal_reaper(void *arg)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct ksock_conn *conn;
        struct ksock_sched *sched;
        struct list_head enomem_conns;
index c56e9922cd5bf3394194757a37c9c5a017cd9a0f..49deb448b0445133172145435de41527a6125255 100644 (file)
@@ -361,7 +361,7 @@ static int libcfs_debug_dumplog_thread(void *arg)
 
 void libcfs_debug_dumplog(void)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct task_struct *dumper;
 
        /* we're being careful to ensure that the kernel thread is
index 9599b7441febcd042b369fee4b96200b3dad1019..27082d2f79386914170f17dac4b6628921ec9207 100644 (file)
@@ -990,7 +990,7 @@ static int tracefiled(void *arg)
        complete(&tctl->tctl_start);
 
        while (1) {
-               wait_queue_t __wait;
+               wait_queue_entry_t __wait;
 
                pc.pc_want_daemon_pages = 0;
                collect_pages(&pc);
index ce4b83584e17a9291b6ebd5873a89a1dfbc5a3cd..9ebba4ef5f9075f6def75cba76189ff11120ba16 100644 (file)
@@ -312,7 +312,7 @@ __must_hold(&the_lnet.ln_eq_wait_lock)
 {
        int tms = *timeout_ms;
        int wait;
-       wait_queue_t wl;
+       wait_queue_entry_t wl;
        unsigned long now;
 
        if (!tms)
index 9fca8d225ee092e92e1fb71a7a6faff5ee1a831c..f075706bba6d90149bcd3d4f0c08743738f35fdc 100644 (file)
@@ -516,7 +516,7 @@ lnet_sock_listen(struct socket **sockp, __u32 local_ip, int local_port,
 int
 lnet_sock_accept(struct socket **newsockp, struct socket *sock)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct socket *newsock;
        int rc;
 
index 999f250ceed019fa2e1d0fb8b4e64bb8611053a0..bf31bc200d273d6e42aedbaf6ce2d3a78bc8a28b 100644 (file)
@@ -192,7 +192,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,
 }
 
 static int seq_fid_alloc_prep(struct lu_client_seq *seq,
-                             wait_queue_t *link)
+                             wait_queue_entry_t *link)
 {
        if (seq->lcs_update) {
                add_wait_queue(&seq->lcs_waitq, link);
@@ -223,7 +223,7 @@ static void seq_fid_alloc_fini(struct lu_client_seq *seq)
 int seq_client_alloc_fid(const struct lu_env *env,
                         struct lu_client_seq *seq, struct lu_fid *fid)
 {
-       wait_queue_t link;
+       wait_queue_entry_t link;
        int rc;
 
        LASSERT(seq);
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(seq_client_alloc_fid);
  */
 void seq_client_flush(struct lu_client_seq *seq)
 {
-       wait_queue_t link;
+       wait_queue_entry_t link;
 
        LASSERT(seq);
        init_waitqueue_entry(&link, current);
index b04d613846ee6f977c1b13570fd02f38794007fc..f24970da8323b8478464a84e4d4a1c3d3e59f500 100644 (file)
@@ -201,7 +201,7 @@ struct l_wait_info {
                           sigmask(SIGALRM))
 
 /**
- * wait_queue_t of Linux (version < 2.6.34) is a FIFO list for exclusively
+ * wait_queue_entry_t of Linux (version < 2.6.34) is a FIFO list for exclusively
  * waiting threads, which is not always desirable because all threads will
  * be waken up again and again, even user only needs a few of them to be
  * active most time. This is not good for performance because cache can
@@ -228,7 +228,7 @@ struct l_wait_info {
  */
 #define __l_wait_event(wq, condition, info, ret, l_add_wait)              \
 do {                                                                      \
-       wait_queue_t __wait;                                             \
+       wait_queue_entry_t __wait;                                               \
        long __timeout = info->lwi_timeout;                       \
        sigset_t   __blocked;                                         \
        int   __allow_intr = info->lwi_allow_intr;                           \
index 8af611033e1235101bee6a06dbee9812c7a37607..96515b839436a5834d5e051db9af38e99359e732 100644 (file)
@@ -207,7 +207,7 @@ int cl_file_inode_init(struct inode *inode, struct lustre_md *md)
 static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
 {
        struct lu_object_header *header = obj->co_lu.lo_header;
-       wait_queue_t       waiter;
+       wait_queue_entry_t         waiter;
 
        if (unlikely(atomic_read(&header->loh_ref) != 1)) {
                struct lu_site *site = obj->co_lu.lo_dev->ld_site;
index 391c632365ae1b1ba446274ee1dc007b1a15a247..e889d3a7de9cd6a4c114027c5ca3a4f1d4e8d767 100644 (file)
@@ -370,7 +370,7 @@ struct lov_thread_info {
        struct ost_lvb    lti_lvb;
        struct cl_2queue        lti_cl2q;
        struct cl_page_list     lti_plist;
-       wait_queue_t      lti_waiter;
+       wait_queue_entry_t        lti_waiter;
        struct cl_attr          lti_attr;
 };
 
index ab3ecfeeadc828a84db890d3d6eddd7066d001e7..eddabbe31e5c76270caf13284ad1303d3e40e71d 100644 (file)
@@ -371,7 +371,7 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
        struct lov_layout_raid0 *r0;
        struct lu_site    *site;
        struct lu_site_bkt_data *bkt;
-       wait_queue_t      *waiter;
+       wait_queue_entry_t        *waiter;
 
        r0  = &lov->u.raid0;
        LASSERT(r0->lo_sub[idx] == los);
index abcf951208d21382af0354db966fd213b05db6f3..76ae600ae2c8f959e9e79bb7f39b36c193a1106e 100644 (file)
@@ -556,7 +556,7 @@ EXPORT_SYMBOL(lu_object_print);
 static struct lu_object *htable_lookup(struct lu_site *s,
                                       struct cfs_hash_bd *bd,
                                       const struct lu_fid *f,
-                                      wait_queue_t *waiter,
+                                      wait_queue_entry_t *waiter,
                                       __u64 *version)
 {
        struct lu_site_bkt_data *bkt;
@@ -670,7 +670,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env,
                                            struct lu_device *dev,
                                            const struct lu_fid *f,
                                            const struct lu_object_conf *conf,
-                                           wait_queue_t *waiter)
+                                           wait_queue_entry_t *waiter)
 {
        struct lu_object      *o;
        struct lu_object      *shadow;
@@ -750,7 +750,7 @@ struct lu_object *lu_object_find_at(const struct lu_env *env,
 {
        struct lu_site_bkt_data *bkt;
        struct lu_object        *obj;
-       wait_queue_t       wait;
+       wait_queue_entry_t         wait;
 
        while (1) {
                obj = lu_object_find_try(env, dev, f, conf, &wait);
index 31885f20fc1583178f9d3108bce20009eca99cb8..cc047de72e2a501fbd65162f37042f6d3a77302a 100644 (file)
@@ -184,7 +184,7 @@ static void hdlcdev_exit(struct slgt_info *info);
 struct cond_wait {
        struct cond_wait *next;
        wait_queue_head_t q;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        unsigned int data;
 };
 static void init_cond_wait(struct cond_wait *w, unsigned int data);
index 27c89cd5d70b3c39ed16f64477009adf7dad70d7..4797217e5e72077d1ab362d613a2210a8d5fc163 100644 (file)
@@ -43,7 +43,7 @@ static void virqfd_deactivate(struct virqfd *virqfd)
        queue_work(vfio_irqfd_cleanup_wq, &virqfd->shutdown);
 }
 
-static int virqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int virqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        struct virqfd *virqfd = container_of(wait, struct virqfd, wait);
        unsigned long flags = (unsigned long)key;
index 042030e5a0357ad698181f817e6a75ca7c3087e3..e4613a3c362dae8ffbb1e701b4dca51bb858625a 100644 (file)
@@ -165,7 +165,7 @@ static void vhost_poll_func(struct file *file, wait_queue_head_t *wqh,
        add_wait_queue(wqh, &poll->wait);
 }
 
-static int vhost_poll_wakeup(wait_queue_t *wait, unsigned mode, int sync,
+static int vhost_poll_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync,
                             void *key)
 {
        struct vhost_poll *poll = container_of(wait, struct vhost_poll, wait);
index f55671d53f28fed413afa54af957add8ed65c972..f72095868b933735a08c3e6c343504ba112cfefd 100644 (file)
@@ -31,7 +31,7 @@ struct vhost_work {
 struct vhost_poll {
        poll_table                table;
        wait_queue_head_t        *wqh;
-       wait_queue_t              wait;
+       wait_queue_entry_t              wait;
        struct vhost_work         work;
        unsigned long             mask;
        struct vhost_dev         *dev;
index beef981aa54f34f40478b019f2afe7e0d81d4c7b..974f5346458a117b76c6fa721ecabd855066cbf4 100644 (file)
@@ -83,7 +83,7 @@ struct autofs_info {
 struct autofs_wait_queue {
        wait_queue_head_t queue;
        struct autofs_wait_queue *next;
-       autofs_wqt_t wait_queue_token;
+       autofs_wqt_t wait_queue_entry_token;
        /* We use the following to see what we are waiting for */
        struct qstr name;
        u32 dev;
index 24a58bf9ca72ce3b51f1188162594654de1c4f82..7071895b06782a04988dbb23eaa48282a2dabe4c 100644 (file)
@@ -104,7 +104,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
        size_t pktsz;
 
        pr_debug("wait id = 0x%08lx, name = %.*s, type=%d\n",
-                (unsigned long) wq->wait_queue_token,
+                (unsigned long) wq->wait_queue_entry_token,
                 wq->name.len, wq->name.name, type);
 
        memset(&pkt, 0, sizeof(pkt)); /* For security reasons */
@@ -120,7 +120,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 
                pktsz = sizeof(*mp);
 
-               mp->wait_queue_token = wq->wait_queue_token;
+               mp->wait_queue_entry_token = wq->wait_queue_entry_token;
                mp->len = wq->name.len;
                memcpy(mp->name, wq->name.name, wq->name.len);
                mp->name[wq->name.len] = '\0';
@@ -133,7 +133,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 
                pktsz = sizeof(*ep);
 
-               ep->wait_queue_token = wq->wait_queue_token;
+               ep->wait_queue_entry_token = wq->wait_queue_entry_token;
                ep->len = wq->name.len;
                memcpy(ep->name, wq->name.name, wq->name.len);
                ep->name[wq->name.len] = '\0';
@@ -153,7 +153,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 
                pktsz = sizeof(*packet);
 
-               packet->wait_queue_token = wq->wait_queue_token;
+               packet->wait_queue_entry_token = wq->wait_queue_entry_token;
                packet->len = wq->name.len;
                memcpy(packet->name, wq->name.name, wq->name.len);
                packet->name[wq->name.len] = '\0';
@@ -428,7 +428,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
                        return -ENOMEM;
                }
 
-               wq->wait_queue_token = autofs4_next_wait_queue;
+               wq->wait_queue_entry_token = autofs4_next_wait_queue;
                if (++autofs4_next_wait_queue == 0)
                        autofs4_next_wait_queue = 1;
                wq->next = sbi->queues;
@@ -461,7 +461,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
                }
 
                pr_debug("new wait id = 0x%08lx, name = %.*s, nfy=%d\n",
-                        (unsigned long) wq->wait_queue_token, wq->name.len,
+                        (unsigned long) wq->wait_queue_entry_token, wq->name.len,
                         wq->name.name, notify);
 
                /*
@@ -471,7 +471,7 @@ int autofs4_wait(struct autofs_sb_info *sbi,
        } else {
                wq->wait_ctr++;
                pr_debug("existing wait id = 0x%08lx, name = %.*s, nfy=%d\n",
-                        (unsigned long) wq->wait_queue_token, wq->name.len,
+                        (unsigned long) wq->wait_queue_entry_token, wq->name.len,
                         wq->name.name, notify);
                mutex_unlock(&sbi->wq_mutex);
                kfree(qstr.name);
@@ -550,13 +550,13 @@ int autofs4_wait(struct autofs_sb_info *sbi,
 }
 
 
-int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_token, int status)
+int autofs4_wait_release(struct autofs_sb_info *sbi, autofs_wqt_t wait_queue_entry_token, int status)
 {
        struct autofs_wait_queue *wq, **wql;
 
        mutex_lock(&sbi->wq_mutex);
        for (wql = &sbi->queues; (wq = *wql) != NULL; wql = &wq->next) {
-               if (wq->wait_queue_token == wait_queue_token)
+               if (wq->wait_queue_entry_token == wait_queue_entry_token)
                        break;
        }
 
index 9bf90bcc56acd69c0e17cf96c9c91d16b498d552..54a4fcd679ede5a7113ff1f7d812b09a7feb1c4b 100644 (file)
@@ -97,7 +97,7 @@ struct cachefiles_cache {
  * backing file read tracking
  */
 struct cachefiles_one_read {
-       wait_queue_t                    monitor;        /* link into monitored waitqueue */
+       wait_queue_entry_t                      monitor;        /* link into monitored waitqueue */
        struct page                     *back_page;     /* backing file page we're waiting for */
        struct page                     *netfs_page;    /* netfs page we're going to fill */
        struct fscache_retrieval        *op;            /* retrieval op covering this */
index 41df8a27d7ebdd623cf94372e4e73f6914feb5b0..3978b324cbca814e86a06017e155f0002c96d1c0 100644 (file)
@@ -204,7 +204,7 @@ wait_for_old_object:
                wait_queue_head_t *wq;
 
                signed long timeout = 60 * HZ;
-               wait_queue_t wait;
+               wait_queue_entry_t wait;
                bool requeue;
 
                /* if the object we're waiting for is queued for processing,
index afbdc418966db8a657ad869d6382201561e8a60d..8be33b33b981927a63400db614003a9b8d7f94dc 100644 (file)
@@ -21,7 +21,7 @@
  * - we use this to detect read completion of backing pages
  * - the caller holds the waitqueue lock
  */
-static int cachefiles_read_waiter(wait_queue_t *wait, unsigned mode,
+static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode,
                                  int sync, void *_key)
 {
        struct cachefiles_one_read *monitor =
index 2a6889b3585f068c73091d8895639b7e941d702a..323ea481d4a8c84442c4848c2a26d4a795c9dc9f 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -84,7 +84,7 @@ struct exceptional_entry_key {
 };
 
 struct wait_exceptional_entry_queue {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct exceptional_entry_key key;
 };
 
@@ -108,7 +108,7 @@ static wait_queue_head_t *dax_entry_waitqueue(struct address_space *mapping,
        return wait_table + hash;
 }
 
-static int wake_exceptional_entry_func(wait_queue_t *wait, unsigned int mode,
+static int wake_exceptional_entry_func(wait_queue_entry_t *wait, unsigned int mode,
                                       int sync, void *keyp)
 {
        struct exceptional_entry_key *key = keyp;
index 68b9fffcb2c8e71baed05ca7ad7a33db7ed15431..9736df2ce89d2db41e6d19cba88a808e034319e9 100644 (file)
@@ -191,7 +191,7 @@ static void eventfd_ctx_do_read(struct eventfd_ctx *ctx, __u64 *cnt)
  * This is used to atomically remove a wait queue entry from the eventfd wait
  * queue head, and read/reset the counter value.
  */
-int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait,
+int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
                                  __u64 *cnt)
 {
        unsigned long flags;
index 5420767c9b686a7a9db30bbf932e85071c83c9f6..5ac1cba5ef727152c3a0e593c5be23e621e1863c 100644 (file)
@@ -244,7 +244,7 @@ struct eppoll_entry {
         * Wait queue item that will be linked to the target file wait
         * queue head.
         */
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        /* The wait queue head that linked the "wait" wait queue item */
        wait_queue_head_t *whead;
@@ -347,13 +347,13 @@ static inline int ep_is_linked(struct list_head *p)
        return !list_empty(p);
 }
 
-static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_t *p)
+static inline struct eppoll_entry *ep_pwq_from_wait(wait_queue_entry_t *p)
 {
        return container_of(p, struct eppoll_entry, wait);
 }
 
 /* Get the "struct epitem" from a wait queue pointer */
-static inline struct epitem *ep_item_from_wait(wait_queue_t *p)
+static inline struct epitem *ep_item_from_wait(wait_queue_entry_t *p)
 {
        return container_of(p, struct eppoll_entry, wait)->base;
 }
@@ -1078,7 +1078,7 @@ static struct epitem *ep_find(struct eventpoll *ep, struct file *file, int fd)
  * mechanism. It is called by the stored file descriptors when they
  * have events to report.
  */
-static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int ep_poll_callback(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        int pwake = 0;
        unsigned long flags;
@@ -1699,7 +1699,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
        int res = 0, eavail, timed_out = 0;
        unsigned long flags;
        u64 slack = 0;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        ktime_t expires, *to = NULL;
 
        if (timeout > 0) {
index 611b5408f6ec48f84d8cd04a4ea5ec1911a968ba..7b447a245760ca09046804cddbc5d9c8b02e9875 100644 (file)
@@ -34,7 +34,7 @@ void pin_insert(struct fs_pin *pin, struct vfsmount *m)
 
 void pin_kill(struct fs_pin *p)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (!p) {
                rcu_read_unlock();
index c08c46a3b8cde00ef5aa40fae87ed2fce06faea1..be5a8f84e5bb725d01bed5f2e7d08b68e709988a 100644 (file)
@@ -6372,7 +6372,7 @@ struct nfs4_lock_waiter {
 };
 
 static int
-nfs4_wake_lock_waiter(wait_queue_t *wait, unsigned int mode, int flags, void *key)
+nfs4_wake_lock_waiter(wait_queue_entry_t *wait, unsigned int mode, int flags, void *key)
 {
        int ret;
        struct cb_notify_lock_args *cbnl = key;
@@ -6415,7 +6415,7 @@ nfs4_retry_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
                                           .inode = state->inode,
                                           .owner = &owner,
                                           .notified = false };
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        /* Don't bother with waitqueue if we don't expect a callback */
        if (!test_bit(NFS_STATE_MAY_NOTIFY_LOCK, &state->flags))
index febed1217b3fd75643a8b826802a2392d62c3883..775304e7f96f44215b14ecdff1713c50d9b2b2df 100644 (file)
@@ -2161,7 +2161,7 @@ void nilfs_flush_segment(struct super_block *sb, ino_t ino)
 }
 
 struct nilfs_segctor_wait_request {
-       wait_queue_t    wq;
+       wait_queue_entry_t      wq;
        __u32           seq;
        int             err;
        atomic_t        done;
index 83b506020718980a69e5285a8c86496c14a2d050..9e37b7028ea4ddaf69e7a5d94c6f2b3daebd52f0 100644 (file)
@@ -47,7 +47,7 @@ static void run_down(struct slot_map *m)
        if (m->c != -1) {
                for (;;) {
                        if (likely(list_empty(&wait.task_list)))
-                               __add_wait_queue_tail(&m->q, &wait);
+                               __add_wait_queue_entry_tail(&m->q, &wait);
                        set_current_state(TASK_UNINTERRUPTIBLE);
 
                        if (m->c == -1)
@@ -85,7 +85,7 @@ static int wait_for_free(struct slot_map *m)
        do {
                long n = left, t;
                if (likely(list_empty(&wait.task_list)))
-                       __add_wait_queue_tail_exclusive(&m->q, &wait);
+                       __add_wait_queue_entry_tail_exclusive(&m->q, &wait);
                set_current_state(TASK_INTERRUPTIBLE);
 
                if (m->c > 0)
index 39bb1e838d8da683fa64dadf7ff150b9369d699e..a11d773e5ff32a21a7b2ec4fb0102acec01a8dfe 100644 (file)
@@ -2956,7 +2956,7 @@ void reiserfs_wait_on_write_block(struct super_block *s)
 
 static void queue_log_writer(struct super_block *s)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct reiserfs_journal *journal = SB_JOURNAL(s);
        set_bit(J_WRITERS_QUEUED, &journal->j_state);
 
index d6c652a31e99d18d2d924af983c11504315af56f..5b524a977d91e408fb1f4fe7418fb966d53087c0 100644 (file)
@@ -180,7 +180,7 @@ static struct poll_table_entry *poll_get_entry(struct poll_wqueues *p)
        return table->entry++;
 }
 
-static int __pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int __pollwake(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        struct poll_wqueues *pwq = wait->private;
        DECLARE_WAITQUEUE(dummy_wait, pwq->polling_task);
@@ -206,7 +206,7 @@ static int __pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
        return default_wake_function(&dummy_wait, mode, sync, key);
 }
 
-static int pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int pollwake(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        struct poll_table_entry *entry;
 
index 7e3d71109f51334d2bb8c71a9d2419e6ca4eeb3f..593b022ac11b873c67b03f7dcd4ebd5686fe9d2d 100644 (file)
@@ -43,7 +43,7 @@ void signalfd_cleanup(struct sighand_struct *sighand)
        if (likely(!waitqueue_active(wqh)))
                return;
 
-       /* wait_queue_t->func(POLLFREE) should do remove_wait_queue() */
+       /* wait_queue_entry_t->func(POLLFREE) should do remove_wait_queue() */
        wake_up_poll(wqh, POLLHUP | POLLFREE);
 }
 
index 1d622f276e3a2c0fba23d979d7ae18cf6a899f30..bda64fcd8a0c2cd6051475a87478b30dec114458 100644 (file)
@@ -81,7 +81,7 @@ struct userfaultfd_unmap_ctx {
 
 struct userfaultfd_wait_queue {
        struct uffd_msg msg;
-       wait_queue_t wq;
+       wait_queue_entry_t wq;
        struct userfaultfd_ctx *ctx;
        bool waken;
 };
@@ -91,7 +91,7 @@ struct userfaultfd_wake_range {
        unsigned long len;
 };
 
-static int userfaultfd_wake_function(wait_queue_t *wq, unsigned mode,
+static int userfaultfd_wake_function(wait_queue_entry_t *wq, unsigned mode,
                                     int wake_flags, void *key)
 {
        struct userfaultfd_wake_range *range = key;
@@ -860,7 +860,7 @@ wakeup:
 static inline struct userfaultfd_wait_queue *find_userfault_in(
                wait_queue_head_t *wqh)
 {
-       wait_queue_t *wq;
+       wait_queue_entry_t *wq;
        struct userfaultfd_wait_queue *uwq;
 
        VM_BUG_ON(!spin_is_locked(&wqh->lock));
@@ -1747,7 +1747,7 @@ static long userfaultfd_ioctl(struct file *file, unsigned cmd,
 static void userfaultfd_show_fdinfo(struct seq_file *m, struct file *f)
 {
        struct userfaultfd_ctx *ctx = f->private_data;
-       wait_queue_t *wq;
+       wait_queue_entry_t *wq;
        struct userfaultfd_wait_queue *uwq;
        unsigned long pending = 0, total = 0;
 
index fcd641032f8d3a87162b0e9f1a63e08ae16d10df..95ba83806c5d98cafae113136a24144bdae036c6 100644 (file)
@@ -33,7 +33,7 @@ struct blk_mq_hw_ctx {
        struct blk_mq_ctx       **ctxs;
        unsigned int            nr_ctx;
 
-       wait_queue_t            dispatch_wait;
+       wait_queue_entry_t              dispatch_wait;
        atomic_t                wait_index;
 
        struct blk_mq_tags      *tags;
index ff0b981f078e238122113da027d96698a5cbe91d..9e4befd95bc7bd285ed4e6faad5953416b3f55d8 100644 (file)
@@ -37,7 +37,7 @@ struct eventfd_ctx *eventfd_ctx_fdget(int fd);
 struct eventfd_ctx *eventfd_ctx_fileget(struct file *file);
 __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n);
 ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt);
-int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait,
+int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_entry_t *wait,
                                  __u64 *cnt);
 
 #else /* CONFIG_EVENTFD */
@@ -73,7 +73,7 @@ static inline ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait,
 }
 
 static inline int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx,
-                                               wait_queue_t *wait, __u64 *cnt)
+                                               wait_queue_entry_t *wait, __u64 *cnt)
 {
        return -ENOSYS;
 }
index 0c1de05098c85cfa2a46d53ed843794b73faf5c1..76c2fbc59f35df361ed52b0183a4e93e9c70e7da 100644 (file)
@@ -46,7 +46,7 @@ struct kvm_kernel_irqfd_resampler {
 struct kvm_kernel_irqfd {
        /* Used for MSI fast-path */
        struct kvm *kvm;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        /* Update side is protected by irqfds.lock */
        struct kvm_kernel_irq_routing_entry irq_entry;
        seqcount_t irq_entry_sc;
index 316a19f6b635db760570a7e7b66af2a03b697e5e..e7bbd9d4dc6cb98a04b718f3ec955af1f1b6e947 100644 (file)
@@ -524,7 +524,7 @@ void page_endio(struct page *page, bool is_write, int err);
 /*
  * Add an arbitrary waiter to a page's wait queue
  */
-extern void add_page_wait_queue(struct page *page, wait_queue_t *waiter);
+extern void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter);
 
 /*
  * Fault everything in given userspace address range in.
index 75ffc5729e4c654bdccd142df3d3fbac0018d6e4..2889f09a1c6080523ebf7179d337868d4610763b 100644 (file)
@@ -75,7 +75,7 @@ static inline void init_poll_funcptr(poll_table *pt, poll_queue_proc qproc)
 struct poll_table_entry {
        struct file *filp;
        unsigned long key;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        wait_queue_head_t *wait_address;
 };
 
index edf9b2cad277d95d5b4b2ffd4b3202d2abd14f70..f57076b958b73d313b9f92639377f94d866197dd 100644 (file)
@@ -183,7 +183,7 @@ struct virqfd {
        void                    (*thread)(void *, void *);
        void                    *data;
        struct work_struct      inject;
-       wait_queue_t            wait;
+       wait_queue_entry_t              wait;
        poll_table              pt;
        struct work_struct      shutdown;
        struct virqfd           **pvirqfd;
index db076ca7f11da03f474be67f792e1189b96425eb..5889f0c86ff706d343ec8275f444f9606abf67e8 100644 (file)
 #include <asm/current.h>
 #include <uapi/linux/wait.h>
 
-typedef struct __wait_queue wait_queue_t;
-typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key);
-int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key);
+typedef struct wait_queue_entry wait_queue_entry_t;
+typedef int (*wait_queue_func_t)(wait_queue_entry_t *wait, unsigned mode, int flags, void *key);
+int default_wake_function(wait_queue_entry_t *wait, unsigned mode, int flags, void *key);
 
-/* __wait_queue::flags */
+/* wait_queue_entry::flags */
 #define WQ_FLAG_EXCLUSIVE      0x01
 #define WQ_FLAG_WOKEN          0x02
 
-struct __wait_queue {
+/*
+ * A single wait-queue entry structure:
+ */
+struct wait_queue_entry {
        unsigned int            flags;
        void                    *private;
        wait_queue_func_t       func;
@@ -34,7 +37,7 @@ struct wait_bit_key {
 
 struct wait_bit_queue {
        struct wait_bit_key     key;
-       wait_queue_t            wait;
+       wait_queue_entry_t      wait;
 };
 
 struct __wait_queue_head {
@@ -55,7 +58,7 @@ struct task_struct;
        .task_list      = { NULL, NULL } }
 
 #define DECLARE_WAITQUEUE(name, tsk)                                   \
-       wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk)
+       wait_queue_entry_t name = __WAITQUEUE_INITIALIZER(name, tsk)
 
 #define __WAIT_QUEUE_HEAD_INITIALIZER(name) {                          \
        .lock           = __SPIN_LOCK_UNLOCKED(name.lock),              \
@@ -88,7 +91,7 @@ extern void __init_waitqueue_head(wait_queue_head_t *q, const char *name, struct
 # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name)
 #endif
 
-static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
+static inline void init_waitqueue_entry(wait_queue_entry_t *q, struct task_struct *p)
 {
        q->flags        = 0;
        q->private      = p;
@@ -96,7 +99,7 @@ static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
 }
 
 static inline void
-init_waitqueue_func_entry(wait_queue_t *q, wait_queue_func_t func)
+init_waitqueue_func_entry(wait_queue_entry_t *q, wait_queue_func_t func)
 {
        q->flags        = 0;
        q->private      = NULL;
@@ -159,11 +162,11 @@ static inline bool wq_has_sleeper(wait_queue_head_t *wq)
        return waitqueue_active(wq);
 }
 
-extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
-extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait);
-extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait);
+extern void add_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait);
+extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait);
+extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait);
 
-static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
+static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *new)
 {
        list_add(&new->task_list, &head->task_list);
 }
@@ -172,27 +175,27 @@ static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
  * Used for wake-one threads:
  */
 static inline void
-__add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
+__add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        wait->flags |= WQ_FLAG_EXCLUSIVE;
        __add_wait_queue(q, wait);
 }
 
-static inline void __add_wait_queue_tail(wait_queue_head_t *head,
-                                        wait_queue_t *new)
+static inline void __add_wait_queue_entry_tail(wait_queue_head_t *head,
+                                        wait_queue_entry_t *new)
 {
        list_add_tail(&new->task_list, &head->task_list);
 }
 
 static inline void
-__add_wait_queue_tail_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
+__add_wait_queue_entry_tail_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        wait->flags |= WQ_FLAG_EXCLUSIVE;
-       __add_wait_queue_tail(q, wait);
+       __add_wait_queue_entry_tail(q, wait);
 }
 
 static inline void
-__remove_wait_queue(wait_queue_head_t *head, wait_queue_t *old)
+__remove_wait_queue(wait_queue_head_t *head, wait_queue_entry_t *old)
 {
        list_del(&old->task_list);
 }
@@ -249,7 +252,7 @@ wait_queue_head_t *bit_waitqueue(void *, int);
        (!__builtin_constant_p(state) ||                                \
                state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE)  \
 
-extern void init_wait_entry(wait_queue_t *__wait, int flags);
+extern void init_wait_entry(wait_queue_entry_t *__wait, int flags);
 
 /*
  * The below macro ___wait_event() has an explicit shadow of the __ret
@@ -266,7 +269,7 @@ extern void init_wait_entry(wait_queue_t *__wait, int flags);
 #define ___wait_event(wq, condition, state, exclusive, ret, cmd)       \
 ({                                                                     \
        __label__ __out;                                                \
-       wait_queue_t __wait;                                            \
+       wait_queue_entry_t __wait;                                              \
        long __ret = ret;       /* explicit shadow */                   \
                                                                        \
        init_wait_entry(&__wait, exclusive ? WQ_FLAG_EXCLUSIVE : 0);    \
@@ -620,8 +623,8 @@ do {                                                                        \
        __ret;                                                          \
 })
 
-extern int do_wait_intr(wait_queue_head_t *, wait_queue_t *);
-extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_t *);
+extern int do_wait_intr(wait_queue_head_t *, wait_queue_entry_t *);
+extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
 
 #define __wait_event_interruptible_locked(wq, condition, exclusive, fn) \
 ({                                                                     \
@@ -967,17 +970,17 @@ do {                                                                      \
 /*
  * Waitqueues which are removed from the waitqueue_head at wakeup time
  */
-void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
-void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
-long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_t *wait, int state);
-void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
-long wait_woken(wait_queue_t *wait, unsigned mode, long timeout);
-int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
-int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key);
+void prepare_to_wait(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
+void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
+long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_entry_t *wait, int state);
+void finish_wait(wait_queue_head_t *q, wait_queue_entry_t *wait);
+long wait_woken(wait_queue_entry_t *wait, unsigned mode, long timeout);
+int woken_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
+int autoremove_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
+int wake_bit_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key);
 
 #define DEFINE_WAIT_FUNC(name, function)                               \
-       wait_queue_t name = {                                           \
+       wait_queue_entry_t name = {                                     \
                .private        = current,                              \
                .func           = function,                             \
                .task_list      = LIST_HEAD_INIT((name).task_list),     \
index fd60eccb59a67969eba53416a376a3c912d62d81..75e612a458244469992522f3a5951f680332d682 100644 (file)
@@ -62,7 +62,7 @@ struct unix_sock {
 #define UNIX_GC_CANDIDATE      0
 #define UNIX_GC_MAYBE_CYCLE    1
        struct socket_wq        peer_wq;
-       wait_queue_t            peer_wake;
+       wait_queue_entry_t              peer_wake;
 };
 
 static inline struct unix_sock *unix_sk(const struct sock *sk)
index aa63451ef20aacdf3677dca02b990a3e8e73cdc0..1953f8d6063b39f86f2f4c5c59fe4bef97424c54 100644 (file)
@@ -26,7 +26,7 @@
 #define AUTOFS_MIN_PROTO_VERSION       AUTOFS_PROTO_VERSION
 
 /*
- * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
+ * The wait_queue_entry_token (autofs_wqt_t) is part of a structure which is passed
  * back to the kernel via ioctl from userspace. On architectures where 32- and
  * 64-bit userspace binaries can be executed it's important that the size of
  * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
@@ -49,7 +49,7 @@ struct autofs_packet_hdr {
 
 struct autofs_packet_missing {
        struct autofs_packet_hdr hdr;
-       autofs_wqt_t wait_queue_token;
+       autofs_wqt_t wait_queue_entry_token;
        int len;
        char name[NAME_MAX+1];
 };     
index 7c6da423d54ee6f3298cdf479d91a900cb5b2c4c..65b72d0222e7c35f737f0d47a4dcd6ac3aa292d0 100644 (file)
@@ -108,7 +108,7 @@ enum autofs_notify {
 /* v4 multi expire (via pipe) */
 struct autofs_packet_expire_multi {
        struct autofs_packet_hdr hdr;
-       autofs_wqt_t wait_queue_token;
+       autofs_wqt_t wait_queue_entry_token;
        int len;
        char name[NAME_MAX+1];
 };
@@ -123,7 +123,7 @@ union autofs_packet_union {
 /* autofs v5 common packet struct */
 struct autofs_v5_packet {
        struct autofs_packet_hdr hdr;
-       autofs_wqt_t wait_queue_token;
+       autofs_wqt_t wait_queue_entry_token;
        __u32 dev;
        __u64 ino;
        __u32 uid;
index 516acdb0e0ec9bd48e3006a8ede165437b3e121f..7d694437ab443c41ee13775c5f480d14334f2262 100644 (file)
@@ -1004,7 +1004,7 @@ struct wait_opts {
        int __user              *wo_stat;
        struct rusage __user    *wo_rusage;
 
-       wait_queue_t            child_wait;
+       wait_queue_entry_t              child_wait;
        int                     notask_error;
 };
 
@@ -1541,7 +1541,7 @@ static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
        return 0;
 }
 
-static int child_wait_callback(wait_queue_t *wait, unsigned mode,
+static int child_wait_callback(wait_queue_entry_t *wait, unsigned mode,
                                int sync, void *key)
 {
        struct wait_opts *wo = container_of(wait, struct wait_opts,
index 357348a6cf6b4d71dbc24c9ad89ad2d0e63b20d2..d6cf71d08f219ae23add931022ee676e56ab053e 100644 (file)
@@ -225,7 +225,7 @@ struct futex_pi_state {
  * @requeue_pi_key:    the requeue_pi target futex key
  * @bitset:            bitset for the optional bitmasked wakeup
  *
- * We use this hashed waitqueue, instead of a normal wait_queue_t, so
+ * We use this hashed waitqueue, instead of a normal wait_queue_entry_t, so
  * we can wake only the relevant ones (hashed queues may be shared).
  *
  * A futex_q has a woken state, just like tasks have TASK_RUNNING.
index 53f9558fa925f3b40b080b5efa59be30c03b857d..13fc5ae9bf2f6c96ee82ad140d89e3231ade1c88 100644 (file)
@@ -66,7 +66,7 @@ do_wait_for_common(struct completion *x,
        if (!x->done) {
                DECLARE_WAITQUEUE(wait, current);
 
-               __add_wait_queue_tail_exclusive(&x->wait, &wait);
+               __add_wait_queue_entry_tail_exclusive(&x->wait, &wait);
                do {
                        if (signal_pending_state(state, current)) {
                                timeout = -ERESTARTSYS;
index 326d4f88e2b1dbda470c7730c6ae1a67cc095f99..5b36644536ab5972048536351a5331b95af82021 100644 (file)
@@ -3687,7 +3687,7 @@ asmlinkage __visible void __sched preempt_schedule_irq(void)
        exception_exit(prev_state);
 }
 
-int default_wake_function(wait_queue_t *curr, unsigned mode, int wake_flags,
+int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flags,
                          void *key)
 {
        return try_to_wake_up(curr->private, mode, wake_flags);
index b8c84c6dee64bd31ca28b4cfe7283a55945aa596..301ea02dede0489d870019c27bd7da7a9b5a4c2d 100644 (file)
@@ -21,7 +21,7 @@ void __init_waitqueue_head(wait_queue_head_t *q, const char *name, struct lock_c
 
 EXPORT_SYMBOL(__init_waitqueue_head);
 
-void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
+void add_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        unsigned long flags;
 
@@ -32,18 +32,18 @@ void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
 }
 EXPORT_SYMBOL(add_wait_queue);
 
-void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait)
+void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        unsigned long flags;
 
        wait->flags |= WQ_FLAG_EXCLUSIVE;
        spin_lock_irqsave(&q->lock, flags);
-       __add_wait_queue_tail(q, wait);
+       __add_wait_queue_entry_tail(q, wait);
        spin_unlock_irqrestore(&q->lock, flags);
 }
 EXPORT_SYMBOL(add_wait_queue_exclusive);
 
-void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
+void remove_wait_queue(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        unsigned long flags;
 
@@ -66,7 +66,7 @@ EXPORT_SYMBOL(remove_wait_queue);
 static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
                        int nr_exclusive, int wake_flags, void *key)
 {
-       wait_queue_t *curr, *next;
+       wait_queue_entry_t *curr, *next;
 
        list_for_each_entry_safe(curr, next, &q->task_list, task_list) {
                unsigned flags = curr->flags;
@@ -170,7 +170,7 @@ EXPORT_SYMBOL_GPL(__wake_up_sync);  /* For internal use only */
  * loads to move into the critical region).
  */
 void
-prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)
+prepare_to_wait(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
 {
        unsigned long flags;
 
@@ -184,20 +184,20 @@ prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)
 EXPORT_SYMBOL(prepare_to_wait);
 
 void
-prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state)
+prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
 {
        unsigned long flags;
 
        wait->flags |= WQ_FLAG_EXCLUSIVE;
        spin_lock_irqsave(&q->lock, flags);
        if (list_empty(&wait->task_list))
-               __add_wait_queue_tail(q, wait);
+               __add_wait_queue_entry_tail(q, wait);
        set_current_state(state);
        spin_unlock_irqrestore(&q->lock, flags);
 }
 EXPORT_SYMBOL(prepare_to_wait_exclusive);
 
-void init_wait_entry(wait_queue_t *wait, int flags)
+void init_wait_entry(wait_queue_entry_t *wait, int flags)
 {
        wait->flags = flags;
        wait->private = current;
@@ -206,7 +206,7 @@ void init_wait_entry(wait_queue_t *wait, int flags)
 }
 EXPORT_SYMBOL(init_wait_entry);
 
-long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_t *wait, int state)
+long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_entry_t *wait, int state)
 {
        unsigned long flags;
        long ret = 0;
@@ -230,7 +230,7 @@ long prepare_to_wait_event(wait_queue_head_t *q, wait_queue_t *wait, int state)
        } else {
                if (list_empty(&wait->task_list)) {
                        if (wait->flags & WQ_FLAG_EXCLUSIVE)
-                               __add_wait_queue_tail(q, wait);
+                               __add_wait_queue_entry_tail(q, wait);
                        else
                                __add_wait_queue(q, wait);
                }
@@ -249,10 +249,10 @@ EXPORT_SYMBOL(prepare_to_wait_event);
  * condition in the caller before they add the wait
  * entry to the wake queue.
  */
-int do_wait_intr(wait_queue_head_t *wq, wait_queue_t *wait)
+int do_wait_intr(wait_queue_head_t *wq, wait_queue_entry_t *wait)
 {
        if (likely(list_empty(&wait->task_list)))
-               __add_wait_queue_tail(wq, wait);
+               __add_wait_queue_entry_tail(wq, wait);
 
        set_current_state(TASK_INTERRUPTIBLE);
        if (signal_pending(current))
@@ -265,10 +265,10 @@ int do_wait_intr(wait_queue_head_t *wq, wait_queue_t *wait)
 }
 EXPORT_SYMBOL(do_wait_intr);
 
-int do_wait_intr_irq(wait_queue_head_t *wq, wait_queue_t *wait)
+int do_wait_intr_irq(wait_queue_head_t *wq, wait_queue_entry_t *wait)
 {
        if (likely(list_empty(&wait->task_list)))
-               __add_wait_queue_tail(wq, wait);
+               __add_wait_queue_entry_tail(wq, wait);
 
        set_current_state(TASK_INTERRUPTIBLE);
        if (signal_pending(current))
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(do_wait_intr_irq);
  * the wait descriptor from the given waitqueue if still
  * queued.
  */
-void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
+void finish_wait(wait_queue_head_t *q, wait_queue_entry_t *wait)
 {
        unsigned long flags;
 
@@ -316,7 +316,7 @@ void finish_wait(wait_queue_head_t *q, wait_queue_t *wait)
 }
 EXPORT_SYMBOL(finish_wait);
 
-int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
+int autoremove_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        int ret = default_wake_function(wait, mode, sync, key);
 
@@ -351,7 +351,7 @@ static inline bool is_kthread_should_stop(void)
  * remove_wait_queue(&wq, &wait);
  *
  */
-long wait_woken(wait_queue_t *wait, unsigned mode, long timeout)
+long wait_woken(wait_queue_entry_t *wait, unsigned mode, long timeout)
 {
        set_current_state(mode); /* A */
        /*
@@ -375,7 +375,7 @@ long wait_woken(wait_queue_t *wait, unsigned mode, long timeout)
 }
 EXPORT_SYMBOL(wait_woken);
 
-int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
+int woken_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        /*
         * Although this function is called under waitqueue lock, LOCK
@@ -391,7 +391,7 @@ int woken_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
 }
 EXPORT_SYMBOL(woken_wake_function);
 
-int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *arg)
+int wake_bit_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg)
 {
        struct wait_bit_key *key = arg;
        struct wait_bit_queue *wait_bit
@@ -534,7 +534,7 @@ static inline wait_queue_head_t *atomic_t_waitqueue(atomic_t *p)
        return bit_waitqueue(p, 0);
 }
 
-static int wake_atomic_t_function(wait_queue_t *wait, unsigned mode, int sync,
+static int wake_atomic_t_function(wait_queue_entry_t *wait, unsigned mode, int sync,
                                  void *arg)
 {
        struct wait_bit_key *key = arg;
index c74bf39ef7643fdc4ecc219aa25b58feabcd91f3..a86688fabc55c4a4ec2bad843f6dc1e0e411f2d1 100644 (file)
@@ -2864,11 +2864,11 @@ bool flush_work(struct work_struct *work)
 EXPORT_SYMBOL_GPL(flush_work);
 
 struct cwt_wait {
-       wait_queue_t            wait;
+       wait_queue_entry_t              wait;
        struct work_struct      *work;
 };
 
-static int cwt_wakefn(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int cwt_wakefn(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        struct cwt_wait *cwait = container_of(wait, struct cwt_wait, wait);
 
index 6f1be573a5e60fbb0c4a6cbcf85df9b32b0fc673..80c19ee81e9515a70d4ebe04c845bf4d8ecf349a 100644 (file)
@@ -768,10 +768,10 @@ struct wait_page_key {
 struct wait_page_queue {
        struct page *page;
        int bit_nr;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 };
 
-static int wake_page_function(wait_queue_t *wait, unsigned mode, int sync, void *arg)
+static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *arg)
 {
        struct wait_page_key *key = arg;
        struct wait_page_queue *wait_page
@@ -834,7 +834,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
                struct page *page, int bit_nr, int state, bool lock)
 {
        struct wait_page_queue wait_page;
-       wait_queue_t *wait = &wait_page.wait;
+       wait_queue_entry_t *wait = &wait_page.wait;
        int ret = 0;
 
        init_wait(wait);
@@ -847,7 +847,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
 
                if (likely(list_empty(&wait->task_list))) {
                        if (lock)
-                               __add_wait_queue_tail_exclusive(q, wait);
+                               __add_wait_queue_entry_tail_exclusive(q, wait);
                        else
                                __add_wait_queue(q, wait);
                        SetPageWaiters(page);
@@ -907,7 +907,7 @@ int wait_on_page_bit_killable(struct page *page, int bit_nr)
  *
  * Add an arbitrary @waiter to the wait queue for the nominated @page.
  */
-void add_page_wait_queue(struct page *page, wait_queue_t *waiter)
+void add_page_wait_queue(struct page *page, wait_queue_entry_t *waiter)
 {
        wait_queue_head_t *q = page_waitqueue(page);
        unsigned long flags;
index 94172089f52fce369c57ce8d3e783a9480d522f2..9a90b096dc6b155f51c676b071210695b1afa10e 100644 (file)
@@ -170,7 +170,7 @@ struct mem_cgroup_event {
         */
        poll_table pt;
        wait_queue_head_t *wqh;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        struct work_struct remove;
 };
 
@@ -1479,10 +1479,10 @@ static DECLARE_WAIT_QUEUE_HEAD(memcg_oom_waitq);
 
 struct oom_wait_info {
        struct mem_cgroup *memcg;
-       wait_queue_t    wait;
+       wait_queue_entry_t      wait;
 };
 
-static int memcg_oom_wake_function(wait_queue_t *wait,
+static int memcg_oom_wake_function(wait_queue_entry_t *wait,
        unsigned mode, int sync, void *arg)
 {
        struct mem_cgroup *wake_memcg = (struct mem_cgroup *)arg;
@@ -3725,7 +3725,7 @@ static void memcg_event_remove(struct work_struct *work)
  *
  * Called with wqh->lock held and interrupts disabled.
  */
-static int memcg_event_wake(wait_queue_t *wait, unsigned mode,
+static int memcg_event_wake(wait_queue_entry_t *wait, unsigned mode,
                            int sync, void *key)
 {
        struct mem_cgroup_event *event =
index 47a659dedd44405a277190d3bf9b1655636573d5..1c0294858527367442c4c3f142e2972451352c5d 100644 (file)
@@ -312,7 +312,7 @@ void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask)
 {
        void *element;
        unsigned long flags;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        gfp_t gfp_temp;
 
        VM_WARN_ON_ONCE(gfp_mask & __GFP_ZERO);
index e67d6ba4e98e73210c8046e82612180fca220e89..a6c7dece4660c2d8c89419b3c1f0ab06692a9539 100644 (file)
@@ -1902,7 +1902,7 @@ unlock:
  * entry unconditionally - even if something else had already woken the
  * target.
  */
-static int synchronous_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key)
+static int synchronous_wake_function(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        int ret = default_wake_function(wait, mode, sync, key);
        list_del_init(&wait->task_list);
index 7bc2208b6cc4c445286c20e01d9911ac9e75b9b2..dca3cdd1a014bf1fd070dae5449e594cea38d18b 100644 (file)
@@ -95,7 +95,7 @@ enum {
 
 struct p9_poll_wait {
        struct p9_conn *conn;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        wait_queue_head_t *wait_addr;
 };
 
@@ -522,7 +522,7 @@ error:
        clear_bit(Wworksched, &m->wsched);
 }
 
-static int p9_pollwake(wait_queue_t *wait, unsigned int mode, int sync, void *key)
+static int p9_pollwake(wait_queue_entry_t *wait, unsigned int mode, int sync, void *key)
 {
        struct p9_poll_wait *pwait =
                container_of(wait, struct p9_poll_wait, wait);
index fbf251fef70fe89d61a3533bbb7a6b3e18429c01..5c4808b3da2d4836af23b6906e8dfd4b304a96ef 100644 (file)
@@ -484,7 +484,7 @@ static int bnep_session(void *arg)
        struct net_device *dev = s->dev;
        struct sock *sk = s->sock->sk;
        struct sk_buff *skb;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        BT_DBG("");
 
index 9e59b66541264a56a5a6a30651351b608bf1a8e8..14f7c8135c311024c27e5e59e169d7180f0a36ad 100644 (file)
@@ -280,7 +280,7 @@ static int cmtp_session(void *arg)
        struct cmtp_session *session = arg;
        struct sock *sk = session->sock->sk;
        struct sk_buff *skb;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        BT_DBG("session %p", session);
 
index 0bec4588c3c8c3db45a564c81394c464a7faaf4a..fc31161e98f24c59c60c045fdb0d9359f77b1747 100644 (file)
@@ -1244,7 +1244,7 @@ static void hidp_session_run(struct hidp_session *session)
 static int hidp_session_thread(void *arg)
 {
        struct hidp_session *session = arg;
-       wait_queue_t ctrl_wait, intr_wait;
+       wait_queue_entry_t ctrl_wait, intr_wait;
 
        BT_DBG("session %p", session);
 
index db1866f2ffcf6e3ed505ce5c1c5a4f11e6a908bd..34678828e2bb5f724bc64098c3fbc763554cd34d 100644 (file)
@@ -68,7 +68,7 @@ static inline int connection_based(struct sock *sk)
        return sk->sk_type == SOCK_SEQPACKET || sk->sk_type == SOCK_STREAM;
 }
 
-static int receiver_wake_function(wait_queue_t *wait, unsigned int mode, int sync,
+static int receiver_wake_function(wait_queue_entry_t *wait, unsigned int mode, int sync,
                                  void *key)
 {
        unsigned long bits = (unsigned long)key;
index 1a0c961f4ffeef40abc5b980e004b01120e3c536..c77ced0109b75626313aabe9fecf8931495c7274 100644 (file)
@@ -343,7 +343,7 @@ found:
  * are still connected to it and there's no way to inform "a polling
  * implementation" that it should let go of a certain wait queue
  *
- * In order to propagate a wake up, a wait_queue_t of the client
+ * In order to propagate a wake up, a wait_queue_entry_t of the client
  * socket is enqueued on the peer_wait queue of the server socket
  * whose wake function does a wake_up on the ordinary client socket
  * wait queue. This connection is established whenever a write (or
@@ -352,7 +352,7 @@ found:
  * was relayed.
  */
 
-static int unix_dgram_peer_wake_relay(wait_queue_t *q, unsigned mode, int flags,
+static int unix_dgram_peer_wake_relay(wait_queue_entry_t *q, unsigned mode, int flags,
                                      void *key)
 {
        struct unix_sock *u;
index c109b82eef4bd424f46fbc1816a196de186775f9..6362da17ac3f329b59623ed19e16c049a7f67108 100644 (file)
@@ -1577,7 +1577,7 @@ static ssize_t snd_ctl_read(struct file *file, char __user *buffer,
                struct snd_ctl_event ev;
                struct snd_kctl_event *kev;
                while (list_empty(&ctl->events)) {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
                        if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
                                err = -EAGAIN;
                                goto __end_lock;
index 9602a7e38d8a811dd895dca66dc63c7a0c03db62..a73baa1242beeaf6c714f4c0986fd057286d50d6 100644 (file)
@@ -85,7 +85,7 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
        int major = imajor(inode);
        struct snd_hwdep *hw;
        int err;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (major == snd_major) {
                hw = snd_lookup_minor_data(iminor(inode),
index 6bda8436d7652299a90c29d5608c0b4b34f4f693..d61d2b3cd5211de9468b791cd3a56203687a6eb1 100644 (file)
@@ -989,7 +989,7 @@ EXPORT_SYMBOL(snd_card_file_remove);
  */
 int snd_power_wait(struct snd_card *card, unsigned int power_state)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int result = 0;
 
        /* fastpath */
index 36baf962f9b081649c07902a16abfee6932d79ad..cd8b7bef8d061813e14a4f3a6a94e30ce48f7487 100644 (file)
@@ -1554,7 +1554,7 @@ static int snd_pcm_oss_sync1(struct snd_pcm_substream *substream, size_t size)
        ssize_t result = 0;
        snd_pcm_state_t state;
        long res;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        runtime = substream->runtime;
        init_waitqueue_entry(&wait, current);
@@ -2387,7 +2387,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
        struct snd_pcm_oss_file *pcm_oss_file;
        struct snd_pcm_oss_setup setup[2];
        int nonblock;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        err = nonseekable_open(inode, file);
        if (err < 0)
index 5088d4b8db2222e28a71baaa4db7c70a30997e48..dd5254077ef71bd54b67d5b16fb0975cde7d19d9 100644 (file)
@@ -1904,7 +1904,7 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
 {
        struct snd_pcm_runtime *runtime = substream->runtime;
        int is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int err = 0;
        snd_pcm_uframes_t avail = 0;
        long wait_time, tout;
index 13dec5ec93f20d4cfd7b9b7c9d3d8b17ecd33324..faa2e2be6f2ea52bad0a2be30368b6386dcba11f 100644 (file)
@@ -1652,7 +1652,7 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
        struct snd_card *card;
        struct snd_pcm_runtime *runtime;
        struct snd_pcm_substream *s;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int result = 0;
        int nonblock = 0;
 
@@ -2353,7 +2353,7 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file)
 static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
 {
        int err;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (pcm == NULL) {
                err = -ENODEV;
index ab890336175fbc022b2c641a857c258096b6b0f8..32588ad05653650560d5c99edf98c4e2c520040f 100644 (file)
@@ -368,7 +368,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
        int err;
        struct snd_rawmidi *rmidi;
        struct snd_rawmidi_file *rawmidi_file = NULL;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK)) 
                return -EINVAL;         /* invalid combination */
@@ -1002,7 +1002,7 @@ static ssize_t snd_rawmidi_read(struct file *file, char __user *buf, size_t coun
        while (count > 0) {
                spin_lock_irq(&runtime->lock);
                while (!snd_rawmidi_ready(substream)) {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
                        if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
                                spin_unlock_irq(&runtime->lock);
                                return result > 0 ? result : -EAGAIN;
@@ -1306,7 +1306,7 @@ static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf,
        while (count > 0) {
                spin_lock_irq(&runtime->lock);
                while (!snd_rawmidi_ready_append(substream, count)) {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
                        if (file->f_flags & O_NONBLOCK) {
                                spin_unlock_irq(&runtime->lock);
                                return result > 0 ? result : -EAGAIN;
@@ -1338,7 +1338,7 @@ static ssize_t snd_rawmidi_write(struct file *file, const char __user *buf,
        if (file->f_flags & O_DSYNC) {
                spin_lock_irq(&runtime->lock);
                while (runtime->avail != runtime->buffer_size) {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
                        unsigned int last_avail = runtime->avail;
                        init_waitqueue_entry(&wait, current);
                        add_wait_queue(&runtime->sleep, &wait);
index 01c4cfe30c9feffd4fa24c7223e58d9a604cb026..a8c2822e01984ff207c8a46b5ebd67546ee8b2eb 100644 (file)
@@ -179,7 +179,7 @@ int snd_seq_fifo_cell_out(struct snd_seq_fifo *f,
 {
        struct snd_seq_event_cell *cell;
        unsigned long flags;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (snd_BUG_ON(!f))
                return -EINVAL;
index d4c61ec9be13d7389addd27bc70acf58bda2eecc..d6e9aacdc36bbab34355ebcbb8178cadfc73ba79 100644 (file)
@@ -227,7 +227,7 @@ static int snd_seq_cell_alloc(struct snd_seq_pool *pool,
        struct snd_seq_event_cell *cell;
        unsigned long flags;
        int err = -EAGAIN;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        if (pool == NULL)
                return -EINVAL;
index cd67d1c12cf1ca9a32daa4de797dc0a5ec7bbb86..884c3066b028b9751efab616ea14621606d8985f 100644 (file)
@@ -1964,7 +1964,7 @@ static ssize_t snd_timer_user_read(struct file *file, char __user *buffer,
        spin_lock_irq(&tu->qlock);
        while ((long)count - result >= unit) {
                while (!tu->qused) {
-                       wait_queue_t wait;
+                       wait_queue_entry_t wait;
 
                        if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
                                err = -EAGAIN;
index 4dae9ff9ef5afda526fcedede1a286a848fb0f20..0b1e4b34b29965360843fd26994a034530b54725 100644 (file)
@@ -1782,7 +1782,7 @@ wavefront_should_cause_interrupt (snd_wavefront_t *dev,
                                  int val, int port, unsigned long timeout)
 
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
 
        init_waitqueue_entry(&wait, current);
        spin_lock_irq(&dev->irq_lock);
index dccf3db48fe06cdd4acd7dca661430abb50e4f1e..8bf2ce32d4a8459eae71fd985125458c5544c8f8 100644 (file)
@@ -239,7 +239,7 @@ int snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int
        struct mixart_msg resp;
        u32 msg_frame = 0; /* set to 0, so it's no notification to wait for, but the answer */
        int err;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        long timeout;
 
        init_waitqueue_entry(&wait, current);
@@ -284,7 +284,7 @@ int snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr,
                                   struct mixart_msg *request, u32 notif_event)
 {
        int err;
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        long timeout;
 
        if (snd_BUG_ON(!notif_event))
index fe4ba463b57c5f76f4030c700bb0975eacf057eb..1114166c685c5f7bded28c67d3786122b1913cc8 100644 (file)
@@ -781,7 +781,7 @@ static snd_pcm_uframes_t snd_ymfpci_capture_pointer(struct snd_pcm_substream *su
 
 static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip)
 {
-       wait_queue_t wait;
+       wait_queue_entry_t wait;
        int loops = 4;
 
        while (loops-- > 0) {
index a8d540398bbd0350b8b969820d7a11d528cf672d..9120edf3c94bfccd1e34a625d163385abbd3cbc8 100644 (file)
@@ -184,7 +184,7 @@ int __attribute__((weak)) kvm_arch_set_irq_inatomic(
  * Called with wqh->lock held and interrupts disabled
  */
 static int
-irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key)
+irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 {
        struct kvm_kernel_irqfd *irqfd =
                container_of(wait, struct kvm_kernel_irqfd, wait);