Darrick J. Wong 7317a03df7 xfs: refactor inode ownership change transaction/inode/quota allocation idiom
For file ownership (uid, gid, prid) changes, create a new helper
xfs_trans_alloc_ichange that allocates a transaction and reserves the
appropriate amount of quota against that transction in preparation for a
change of user, group, or project id.  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 ichange transactions slightly.
Since tr_ichange does not have a permanent reservation and cannot roll,
we pass XFS_ILOCK_EXCL to ijoin so that the inode will be unlocked
automatically at commit time.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
2021-02-03 09:18:49 -08:00
..
2020-09-06 18:05:51 -07:00
2020-09-15 20:52:41 -07:00
2020-03-02 20:55:55 -08:00
2019-10-28 08:37:54 -07:00
2020-12-16 16:07:34 -08:00
2020-03-11 09:11:39 -07:00
2020-12-18 12:50:18 -08:00
2020-09-15 20:52:42 -07:00
2021-01-22 16:54:51 -08:00
2019-07-03 08:21:58 -07:00
2020-12-16 16:07:34 -08:00
2020-12-16 16:07:34 -08:00
2020-05-08 08:51:34 -07:00