]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - block/ioprio.c
block: move __get_task_ioprio() into header file
[thirdparty/kernel/stable.git] / block / ioprio.c
index b5a942519a797ceab4729231dd7c673e50ab0613..73301a261429ff9e04a166aefa5c72df55eaee57 100644 (file)
@@ -139,32 +139,6 @@ out:
        return ret;
 }
 
-/*
- * If the task has set an I/O priority, use that. Otherwise, return
- * the default I/O priority.
- *
- * Expected to be called for current task or with task_lock() held to keep
- * io_context stable.
- */
-int __get_task_ioprio(struct task_struct *p)
-{
-       struct io_context *ioc = p->io_context;
-       int prio;
-
-       if (p != current)
-               lockdep_assert_held(&p->alloc_lock);
-       if (ioc)
-               prio = ioc->ioprio;
-       else
-               prio = IOPRIO_DEFAULT;
-
-       if (IOPRIO_PRIO_CLASS(prio) == IOPRIO_CLASS_NONE)
-               prio = IOPRIO_PRIO_VALUE(task_nice_ioclass(p),
-                                        task_nice_ioprio(p));
-       return prio;
-}
-EXPORT_SYMBOL_GPL(__get_task_ioprio);
-
 static int get_task_ioprio(struct task_struct *p)
 {
        int ret;