]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: refactor common transaction/inode/quota allocation idiom
authorDarrick J. Wong <djwong@kernel.org>
Wed, 27 Jan 2021 00:33:29 +0000 (16:33 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 3 Feb 2021 17:18:49 +0000 (09:18 -0800)
commitd6a9f32048d3680401c9973c8598f273259ee07b
treefcbd9018cd563c5e304a41ac05945ed4f2e831c7
parent92c09c233e348989b5f78c2bb8254316513547d0
xfs: refactor common transaction/inode/quota allocation idiom

Create a new helper xfs_trans_alloc_inode that allocates a transaction,
locks and joins an inode to it, and then reserves the appropriate amount
of quota against that transction.  Then replace all the open-coded
idioms with a single call to this helper.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_attr.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.h