• Bob Peterson's avatar
    gfs2: release iopen glock early in evict · 49462e2b
    Bob Peterson authored
    Before this patch, evict would clear the iopen glock's gl_object after
    releasing the inode glock.  In the meantime, another process could reuse
    the same block and thus glocks for a new inode.  It would lock the inode
    glock (exclusively), and then the iopen glock (shared).  The shared
    locking mode doesn't provide any ordering against the evict, so by the
    time the iopen glock is reused, evict may not have gotten to setting
    gl_object to NULL.
    
    Fix that by releasing the iopen glock before the inode glock in
    gfs2_evict_inode.
    
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>gl_object
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    49462e2b
super.c 37.2 KB