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)
commit149a051f82d2b3860fe32fa182dbc83a66274894
tree4ca660bb2ee8ac25661a38587d785cd9f78b2125
parent5b10ca19ea4859d3884d10a3eb8495de92089792
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