diff --git a/[refs] b/[refs] index eadebb90694b..d79317bc0c1d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5b10ca19ea4859d3884d10a3eb8495de92089792 +refs/heads/master: 149a051f82d2b3860fe32fa182dbc83a66274894 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); + } } }