• Kent Overstreet's avatar
    closures: Fix race in closure_sync() · ee526b88
    Kent Overstreet authored
    As pointed out by Linus, closure_sync() was racy; we could skip blocking
    immediately after a get() and a put(), but then that would skip any
    barrier corresponding to the other thread's put() barrier.
    
    To fix this, always do the full __closure_sync() sequence whenever any
    get() has happened and the closure might have been used by other
    threads.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    ee526b88
fs-io-direct.c 15.8 KB