• Andreas Gruenbacher's avatar
    gfs2: Instantiate glocks ouside of glock state engine · 53d69132
    Andreas Gruenbacher authored
    Instantiate glocks outside of the glock state engine: there is no real
    reason for instantiating them inside the glock state engine; it only
    complicates the code.
    
    Instead, instantiate them in gfs2_glock_wait() and gfs2_glock_async_wait()
    using the new gfs2_glock_holder_ready() helper.  On top of that, the only
    other place that acquires a glock without using gfs2_glock_wait() or
    gfs2_glock_async_wait() is gfs2_upgrade_iopen_glock(), so call
    gfs2_glock_holder_ready() there as well.
    
    If a dinode has a pending truncate, the glock-specific instantiate function
    for inodes wakes up the truncate function in the quota daemon.  Waiting for
    the completion of the truncate was previously done by the glock state
    engine, but we now need to wait in inode_go_instantiate().
    
    This also means that gfs2_instantiate() will now no longer return any
    "special" error codes.
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    53d69132
super.c 37.1 KB