diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-08-29 17:20:55 -0400 |
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-08-29 17:20:55 -0400 |
| commit | a422142cfdf90d889d8d3e2affb8311a381530b7 (patch) | |
| tree | bde7e2c7a3ee8bca649aecd877a9ee1593f4223e /include/linux/ioprio.h | |
| parent | 6fc47e31c0e802d205d67e644f654532e5d365d5 (diff) | |
| parent | 60d4684068ff1eec78f55b5888d0bd2d4cca1520 (diff) | |
Merge branch 'master' into upstream
Diffstat (limited to 'include/linux/ioprio.h')
| -rw-r--r-- | include/linux/ioprio.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 88d5961f7a3f..8e2042b9d471 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h | |||
| @@ -59,27 +59,6 @@ static inline int task_nice_ioprio(struct task_struct *task) | |||
| 59 | /* | 59 | /* |
| 60 | * For inheritance, return the highest of the two given priorities | 60 | * For inheritance, return the highest of the two given priorities |
| 61 | */ | 61 | */ |
| 62 | static inline int ioprio_best(unsigned short aprio, unsigned short bprio) | 62 | extern int ioprio_best(unsigned short aprio, unsigned short bprio); |
| 63 | { | ||
| 64 | unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); | ||
| 65 | unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); | ||
| 66 | |||
| 67 | if (!ioprio_valid(aprio)) | ||
| 68 | return bprio; | ||
| 69 | if (!ioprio_valid(bprio)) | ||
| 70 | return aprio; | ||
| 71 | |||
| 72 | if (aclass == IOPRIO_CLASS_NONE) | ||
| 73 | aclass = IOPRIO_CLASS_BE; | ||
| 74 | if (bclass == IOPRIO_CLASS_NONE) | ||
| 75 | bclass = IOPRIO_CLASS_BE; | ||
| 76 | |||
| 77 | if (aclass == bclass) | ||
| 78 | return min(aprio, bprio); | ||
| 79 | if (aclass > bclass) | ||
| 80 | return bprio; | ||
| 81 | else | ||
| 82 | return aprio; | ||
| 83 | } | ||
| 84 | 63 | ||
| 85 | #endif | 64 | #endif |
