Skip to content
  • Tejun Heo's avatar
    block: drop @tsk from attempt_plug_merge() and explain sync rules · bd87b589
    Tejun Heo authored
    
    
    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: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    bd87b589