From 6afe5ff62318fa752a965332d39e0033cd5b0d6e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 22 Jan 2015 13:05:19 -0500 Subject: sched: add bit_wait_io for 3.18 ext4 backport Excerpted from commit 743162013: "sched: Remove proliferation of wait_on_bit() action functions" Signed-off-by: Theodore Ts'o --- kernel/wait.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'kernel/wait.c') diff --git a/kernel/wait.c b/kernel/wait.c index 6698e0c04..bca170ef3 100644 --- a/kernel/wait.c +++ b/kernel/wait.c @@ -287,3 +287,12 @@ wait_queue_head_t *bit_waitqueue(void *word, int bit) return &zone->wait_table[hash_long(val, zone->wait_table_bits)]; } EXPORT_SYMBOL(bit_waitqueue); + +__sched int bit_wait_io(void *word) +{ + if (signal_pending_state(current->state, current)) + return 1; + io_schedule(); + return 0; +} +EXPORT_SYMBOL(bit_wait_io); -- cgit v1.2.3