• Andreas Gruenbacher's avatar
    gfs2: Get rid of GLF_PENDING_DELETE flag · 3056dc46
    Andreas Gruenbacher authored
    Get rid of the GLF_PENDING_DELETE glock flag introduced by commit
    a0e3cc65 ("gfs2: Turn gl_delete into a delayed work").  The only use
    of that flag is to prevent the iopen glock from being demoted (i.e.,
    unlocked) while delete work is pending.  It turns out that demoting the
    iopen glock while delete work is pending is perfectly fine; we only need
    to make sure that the glock isn't being freed while still in use.  This
    is ensured by the previous patch because delete_work_func() owns a
    reference while the work is queued or running.
    
    With these changes, gfs2_queue_delete_work() no longer takes the glock
    spin lock, so we can use it in iopen_go_callback() instead of
    open-coding it there.
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    3056dc46
glock.c 72.8 KB