• D
    xfs: refactor inode creation transaction/inode/quota allocation idiom · f2f7b9ff
    Darrick J. Wong 提交于
    For file creation, create a new helper xfs_trans_alloc_icreate that
    allocates a transaction and reserves the appropriate amount of quota
    against that transction.  Replace all the open-coded idioms with a
    single call to this helper so that we can contain the retry loops in the
    next patchset.
    
    This changes the locking behavior for non-tempfile creation slightly, in
    that we now make the quota reservation without holding the directory
    ILOCK.  While the dquots chosen for inode creation are based on the
    directory state at a given point in time, the directory ILOCK was
    released as soon as the dquot references are picked up.  Hence it was
    never necessary to hold the directory ILOCK for the quota reservation.
    Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: NBrian Foster <bfoster@redhat.com>
    Reviewed-by: NChristoph Hellwig <hch@lst.de>
    f2f7b9ff
xfs_symlink.c 11.8 KB