]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: refactor common transaction/inode/quota allocation idiom
authorDarrick J. Wong <djwong@kernel.org>
Tue, 6 Apr 2021 20:55:40 +0000 (16:55 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 6 Apr 2021 20:55:40 +0000 (16:55 -0400)
commitd2b662c29c22f403d908676eabaa962b45129343
tree8c256ef624dcb847c6f6c0fec154e9a2dde8c4eb
parent4c315460283ff0f2f6168ecb98883b485bfef634
xfs: refactor common transaction/inode/quota allocation idiom

Source kernel commit: 3a1af6c317d0a55524f39079183be107be4c1f39

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trans.h
libxfs/libxfs_api_defs.h
libxfs/trans.c
libxfs/xfs_attr.c
libxfs/xfs_bmap.c