block: drop @tsk from attempt_plug_merge() and explain sync rules
authorTejun Heo <tj@kernel.org>
Wed, 19 Oct 2011 12:33:08 +0000 (14:33 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Oct 2011 12:33:08 +0000 (14:33 +0200)
attempt_plug_merge() accesses elevator without holding queue_lock and
may call into ->elevator_bio_merge_fn().  The elvator is guaranteed to
be valid because it's accessed iff the plugged list has requests and
elevator is never exited with live requests, so as long as the
elevator method can deal with unlocked access, this is safe.

Explain the sync rules around attempt_plug_merge() and drop the
unnecessary @tsk parameter.

This patch doesn't introduce any functional change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

No differences found