diff options
author | Theodore Ts'o <tytso@mit.edu> | 2015-01-22 13:05:19 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@google.com> | 2015-05-28 21:51:04 -0400 |
commit | 34563bc808d3c2d6f8b1d464418612300a90f132 (patch) | |
tree | 6bebf3ba38e990914280fda4116db50f5986a39f /kernel | |
parent | 1161e728ef30016b096abbcc4654ddaf2726b833 (diff) | |
download | edison-v3.10-34563bc808d3c2d6f8b1d464418612300a90f132.tar.gz |
sched: add bit_wait_io for 3.18 ext4 backport
Excerpted from commit 743162013: "sched: Remove proliferation of
wait_on_bit() action functions"
Change-Id: I56153d55a9af9f2911ed6ffb15d36ad89d45cd55
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/wait.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/wait.c b/kernel/wait.c index 6698e0c04ea..bca170ef386 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); |