diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-21 16:51:08 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-21 16:51:08 (GMT) |
commit | 3035b675ad0377b2468b442068062e7f28771dda (patch) | |
tree | 63cf26aa249d067ac12776dd2850ff017747f2b9 /block/ioprio.c | |
parent | 7ca2f234404e738cc807ed87c43f9932513bc8c6 (diff) | |
parent | 7676895f4736421ebafc48de5078e25ea69e88ee (diff) | |
download | linux-3035b675ad0377b2468b442068062e7f28771dda.tar.xz |
Merge branch 'overlayfs-current' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs into for-linus
"The biggest change is to rename the filesystem from "overlayfs" to "overlay".
This will allow legacy overlayfs to be easily carried by distros alongside the
new mainline one. Also fix a couple of copy-up races and allow escaping comma
character in filenames."
The last bit is about commas in pathname mount options...
Diffstat (limited to 'block/ioprio.c')
-rw-r--r-- | block/ioprio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/block/ioprio.c b/block/ioprio.c index e50170c..31666c9 100644 --- a/block/ioprio.c +++ b/block/ioprio.c @@ -157,14 +157,16 @@ out: int ioprio_best(unsigned short aprio, unsigned short bprio) { - unsigned short aclass = IOPRIO_PRIO_CLASS(aprio); - unsigned short bclass = IOPRIO_PRIO_CLASS(bprio); + unsigned short aclass; + unsigned short bclass; - if (aclass == IOPRIO_CLASS_NONE) - aclass = IOPRIO_CLASS_BE; - if (bclass == IOPRIO_CLASS_NONE) - bclass = IOPRIO_CLASS_BE; + if (!ioprio_valid(aprio)) + aprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); + if (!ioprio_valid(bprio)) + bprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM); + aclass = IOPRIO_PRIO_CLASS(aprio); + bclass = IOPRIO_PRIO_CLASS(bprio); if (aclass == bclass) return min(aprio, bprio); if (aclass > bclass) |