]> git.baikalelectronics.ru Git - kernel.git/commit
as-iosched: fix double locking bug in as_merged_requests()
authorJens Axboe <jens.axboe@oracle.com>
Tue, 29 Jan 2008 21:25:18 +0000 (22:25 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 30 Jan 2008 08:11:10 +0000 (09:11 +0100)
commite7efd8594fe7e1fe6be3df30cc004ca03efb7d7c
tree4ca660bb2ee8ac25661a38587d785cd9f78b2125
parent49dd2fa7fe85caa8c9d76bdc692ed746f9e72dbc
as-iosched: fix double locking bug in as_merged_requests()

If the two requests belong to the same io context, we will attempt
to lock the same lock twice. But swapping contexts is pointless in
that case, so just check for rioc == nioc before doing the double
lock and copy.

Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/as-iosched.c