• B
    GFS2: Fix locking bug in failed shared to exclusive conversion · 02ffad08
    Benjamin Marzinski 提交于
    After calling out to the dlm, GFS2 sets the new state of a glock to
    gl_target in gdlm_ast().  However, gl_target is not always the lock
    state that was requested. If a conversion from shared to exclusive
    fails, finish_xmote() will call do_xmote() with LM_ST_UNLOCKED, instead
    of gl->gl_target, so that it can reacquire the lock in exlusive the next
    time around.  In this case, setting the lock to gl_target in gdlm_ast()
    will make GFS2 think that it has the glock in exclusive mode, when
    really, it doesn't have the glock locked at all.  This patch adds a new
    field to the gfs2_glock structure, gl_req, to track the mode that was
    requested.
    Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
    Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
    02ffad08
lock_dlm.c 5.1 KB