]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: Fix computation of merged request priority
authorJan Kara <jack@suse.cz>
Thu, 30 Oct 2014 19:43:38 +0000 (20:43 +0100)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:21 +0000 (18:38 +0100)
commita39c8649e480bf8bf6419bc1ed6c8d66fbc89ebb
treecd7d424238da69c27f5961cf73de29d7e2e31f2a
parente29a7bc42c8ce108b2ffc70a0467c05faea8cc8e
block: Fix computation of merged request priority

commit ece9c72accdc45c3a9484dacb1125ce572647288 upstream.

Priority of a merged request is computed by ioprio_best(). If one of the
requests has undefined priority (IOPRIO_CLASS_NONE) and another request
has priority from IOPRIO_CLASS_BE, the function will return the
undefined priority which is wrong. Fix the function to properly return
priority of a request with the defined priority.

Fixes: d58cdfb89ce0c6bd5f81ae931a984ef298dbda20
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/ioprio.c