Skip to content
  • Steven Whitehouse's avatar
    GFS2: Clean up inode creation path · fd4b4e04
    Steven Whitehouse authored
    
    
    This patch cleans up the inode creation code path in GFS2. After the
    Orlov allocator was merged, a number of potential improvements are
    now possible, and this is a first set of these.
    
    The quota handling is now updated so that it matches the point in
    the code where the allocation takes place. This means that the one
    exception in gfs2_alloc_blocks relating to quota is now no longer
    required, and we can use the generic code everywhere.
    
    In addition the call to figure out whether we need to allocate any
    extra blocks in order to add a directory entry is moved higher up
    gfs2_create_inode. This means that if it returns an error, we
    can deal with that at a stage where it is easier to handle that case.
    The returned status cannot change during the function since we hold
    an exclusive lock on the directory.
    
    Two calls to gfs2_rindex_update have been changed to one, again at
    the top of gfs2_create_inode to simplify error handling.
    
    The time stamps are also now initialised earlier in the creation
    process, this is gradually moving towards being able to remove the
    call to gfs2_refresh_inode in gfs2_inode_create once we have all the
    fields covered.
    
    Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
    fd4b4e04