summaryrefslogtreecommitdiffstats
path: root/tools/wmi
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-01-29 11:32:09 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-02-03 09:18:49 -0800
commit7317a03df703f7cdae3ae9e9635a0ef45849fe09 (patch)
treeac751913a2d3a2fe2376ce8459ec814097f7dfa3 /tools/wmi
parentf2f7b9ff62a28928f6fe2bd55cdb4d4b02ab7477 (diff)
downloadlinux-stable-7317a03df703f7cdae3ae9e9635a0ef45849fe09.tar.gz
linux-stable-7317a03df703f7cdae3ae9e9635a0ef45849fe09.tar.bz2
linux-stable-7317a03df703f7cdae3ae9e9635a0ef45849fe09.zip
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>
Diffstat (limited to 'tools/wmi')
0 files changed, 0 insertions, 0 deletions