diff --git a/[refs] b/[refs] index f1358cfd90a9..f4ba77ba4ec2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3fbd67ad61f6d5a09ea717b56c50bc5c3d8042a8 +refs/heads/master: 85004cc367abc000aa36c0d0e270ab609a68b0cb diff --git a/trunk/block/as-iosched.c b/trunk/block/as-iosched.c index b201d16a7102..96036846a001 100644 --- a/trunk/block/as-iosched.c +++ b/trunk/block/as-iosched.c @@ -1275,9 +1275,13 @@ static void as_merged_requests(struct request_queue *q, struct request *req, * Don't copy here but swap, because when anext is * removed below, it must contain the unused context */ - double_spin_lock(&rioc->lock, &nioc->lock, rioc < nioc); - swap_io_context(&rioc, &nioc); - double_spin_unlock(&rioc->lock, &nioc->lock, rioc < nioc); + if (rioc != nioc) { + double_spin_lock(&rioc->lock, &nioc->lock, + rioc < nioc); + swap_io_context(&rioc, &nioc); + double_spin_unlock(&rioc->lock, &nioc->lock, + rioc < nioc); + } } }