]> git.baikalelectronics.ru Git - kernel.git/commit
block: Optimize ioprio_best()
authorBart Van Assche <bart.vanassche@sandisk.com>
Wed, 19 Apr 2017 21:01:28 +0000 (14:01 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 19 Apr 2017 23:38:36 +0000 (17:38 -0600)
commit4d68a6d670702bf39a7381fb353af4df1e7352ed
treea0121132c58f41bd3ea558e24fb0a7f5839373af
parent7b40ce9ee4f70949dca5f92709dbafc6ef220795
block: Optimize ioprio_best()

Since ioprio_best() translates IOPRIO_CLASS_NONE into IOPRIO_CLASS_BE
and since lower numerical priority values represent a higher priority
a simple numerical comparison is sufficient.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Adam Manzanares <adam.manzanares@wdc.com>
Tested-by: Adam Manzanares <adam.manzanares@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/ioprio.c