• T
    block: drop @tsk from attempt_plug_merge() and explain sync rules · bd87b589
    Tejun Heo 提交于
    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: NTejun Heo <tj@kernel.org>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    bd87b589
elevator.h 7.0 KB