]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: reduce ilock roundtrips in xfs_qm_vop_dqalloc
authorChristoph Hellwig <hch@lst.de>
Mon, 10 Nov 2025 13:23:10 +0000 (14:23 +0100)
committerCarlos Maiolino <cem@kernel.org>
Tue, 11 Nov 2025 10:45:58 +0000 (11:45 +0100)
commit6a7bb6ccd00580461f01e86f592c7d8c7bb54793
treed7e9366d4c69b00a6ba136b163099056bdbf9e2a
parent13d3c1a045628e8453c31bd49578053c093e7a02
xfs: reduce ilock roundtrips in xfs_qm_vop_dqalloc

xfs_qm_vop_dqalloc only needs the (exclusive) ilock for attaching dquots
to the inode if not done so yet.  All the other locks don't touch the inode
and don't need the ilock - the i_rwsem / iolock protects against changes
to the IDs while we are in a method, and the ilock would not help because
dropping it for the dqget calls would be racy anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_qm.c