The patch titled fsaio: init wait bit key has been removed from the -mm tree. Its filename was fsaio-init-wait-bit-key.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ Subject: fsaio: init wait bit key From: Suparna Bhattacharya <suparna@xxxxxxxxxx> init_wait_bit_key() initializes the key field in an already allocated wait bit structure, useful for async wait bit support. Also separate out the wait bit test to a common routine which can be used by different kinds of wakeup callbacks. Signed-off-by: Suparna Bhattacharya <suparna@xxxxxxxxxx> Acked-by: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- include/linux/wait.h | 26 ++++++++++++++++++++++++++ kernel/wait.c | 11 ++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff -puN include/linux/wait.h~fsaio-init-wait-bit-key include/linux/wait.h --- a/include/linux/wait.h~fsaio-init-wait-bit-key +++ a/include/linux/wait.h @@ -108,6 +108,17 @@ static inline int waitqueue_active(wait_ return !list_empty(&q->task_list); } +static inline int test_wait_bit_key(wait_queue_t *wait, + struct wait_bit_key *key) +{ + struct wait_bit_queue *wait_bit + = container_of(wait, struct wait_bit_queue, wait); + + return (wait_bit->key.flags == key->flags && + wait_bit->key.bit_nr == key->bit_nr && + !test_bit(key->bit_nr, key->flags)); +} + /* * Used to distinguish between sync and async io wait context: * sync i/o typically specifies a NULL wait queue entry or a wait @@ -416,6 +427,21 @@ int wake_bit_function(wait_queue_t *wait INIT_LIST_HEAD(&(wait)->task_list); \ } while (0) +static inline void init_wait_bit_key(struct wait_bit_queue *waitbit, + void *word, int bit) +{ + waitbit->key.flags = word; + waitbit->key.bit_nr = bit; +} + +static inline void init_wait_bit_task(struct wait_bit_queue *waitbit, + struct task_struct *tsk) +{ + waitbit->wait.private = tsk; + waitbit->wait.func = wake_bit_function; + INIT_LIST_HEAD(&waitbit->wait.task_list); +} + /** * wait_on_bit - wait for a bit to be cleared * @word: the word being waited on, a kernel virtual address diff -puN kernel/wait.c~fsaio-init-wait-bit-key kernel/wait.c --- a/kernel/wait.c~fsaio-init-wait-bit-key +++ a/kernel/wait.c @@ -139,16 +139,9 @@ EXPORT_SYMBOL(autoremove_wake_function); int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *arg) { - struct wait_bit_key *key = arg; - struct wait_bit_queue *wait_bit - = container_of(wait, struct wait_bit_queue, wait); - - if (wait_bit->key.flags != key->flags || - wait_bit->key.bit_nr != key->bit_nr || - test_bit(key->bit_nr, key->flags)) + if (!test_wait_bit_key(wait, arg)) return 0; - else - return autoremove_wake_function(wait, mode, sync, key); + return autoremove_wake_function(wait, mode, sync, arg); } EXPORT_SYMBOL(wake_bit_function); _ Patches currently in -mm which might be from suparna@xxxxxxxxxx are aio-fix-buggy-put_ioctx-call-in-aio_complete-v2.patch fsaio-add-a-wait-queue-arg-to-the-wait_bit-action-routine.patch fsaio-rename-__lock_page-to-lock_page_blocking.patch fsaio-interfaces-to-initialize-and-to-test-a-wait-bit-key.patch fsaio-add-a-default-io-wait-bit-field-in-task-struct.patch fsaio-enable-wait-bit-based-filtered-wakeups-to-work-for-aio.patch fsaio-enable-asynchronous-wait-page-and-lock-page.patch fsaio-filesystem-aio-read.patch fsaio-aio-o_sync-filesystem-write.patch aio-is-unlikely.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html