xfs: move the dio write relocking out of xfs_ilock_for_iomap
authorChristoph Hellwig <hch@lst.de>
Sun, 23 Jun 2024 05:44:26 +0000 (07:44 +0200)
committerChandan Babu R <chandanbabu@kernel.org>
Mon, 1 Jul 2024 04:02:29 +0000 (09:32 +0530)
commit8626b67acfa424834ad2f321cecc1f768e7f0106
treee111ab563b8e8a45125fb4b1b66d814a4c8d3f0b
parent0c7fcdb6d06cdf8b19b57c17605215b06afa864a
xfs: move the dio write relocking out of xfs_ilock_for_iomap

About half of xfs_ilock_for_iomap deals with a special case for direct
I/O writes to COW files that need to take the ilock exclusively.  Move
this code into the one callers that cares and simplify
xfs_ilock_for_iomap.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/xfs_iomap.c