aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl
diff options
context:
space:
mode:
authorOlaf Faaland <[email protected]>2017-02-23 09:52:08 -0800
committerBrian Behlendorf <[email protected]>2017-02-23 09:52:08 -0800
commit8d5feecacfdcca29336209bdccd6493a5fa53576 (patch)
treefdf10690cd214c4f7fa4928dd88efee0b126241c /module/spl
parent97048200f888afc0b1387bff75049cf37e9715bd (diff)
Linux 4.11 compat: set_task_state() removed
Replace uses of set_task_state(current, STATE) with set_current_state(STATE). In Linux 4.11, torvalds/linux@642fa44, set_task_state() is removed. All spl uses are of the form set_task_state(current, STATE). set_current_state(STATE) is equivalent and has been available since Linux 2.2.26. Furthermore, set_current_state(STATE) is already used in about 15 locations within spl. This change should have no impact other than removing an unnecessary dependency. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Olaf Faaland <[email protected]> Closes #603
Diffstat (limited to 'module/spl')
-rw-r--r--module/spl/spl-err.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/spl/spl-err.c b/module/spl/spl-err.c
index 14ff8a337..cf9f096b1 100644
--- a/module/spl/spl-err.c
+++ b/module/spl/spl-err.c
@@ -65,7 +65,7 @@ spl_panic(const char *file, const char *func, int line, const char *fmt, ...) {
spl_dumpstack();
/* Halt the thread to facilitate further debugging */
- set_task_state(current, TASK_UNINTERRUPTIBLE);
+ set_current_state(TASK_UNINTERRUPTIBLE);
while (1)
schedule();
@@ -98,7 +98,7 @@ vcmn_err(int ce, const char *fmt, va_list ap)
spl_dumpstack();
/* Halt the thread to facilitate further debugging */
- set_task_state(current, TASK_UNINTERRUPTIBLE);
+ set_current_state(TASK_UNINTERRUPTIBLE);
while (1)
schedule();
}