aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-01-22 13:05:19 -0500
committerMister Oyster <oysterized@gmail.com>2017-05-27 19:39:50 +0200
commit6afe5ff62318fa752a965332d39e0033cd5b0d6e (patch)
tree32500605970cfba8189e26f737c2085a3dae4ac3 /kernel
parent0a313f06382a89f03ebcbc7de2b1b6926bf0923d (diff)
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 <tytso@mit.edu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/wait.c9
1 files changed, 9 insertions, 0 deletions
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);