xfs: clean up dqblk extraction
authorDarrick J. Wong <djwong@kernel.org>
Mon, 20 Nov 2023 18:31:38 +0000 (10:31 -0800)
committerChandan Babu R <chandanbabu@kernel.org>
Wed, 22 Nov 2023 18:09:27 +0000 (23:39 +0530)
commited17f7da5f0c8b65b7b5f7c98beb0aadbc0546ee
tree163efb9046eb87b57a2210edbb9cd82b0af295ca
parent98b1cc82c4affc16f5598d4fa14b1858671b2263
xfs: clean up dqblk extraction

Since the introduction of xfs_dqblk in V5, xfs really ought to find the
dqblk pointer from the dquot buffer, then compute the xfs_disk_dquot
pointer from the dqblk pointer.  Fix the open-coded xfs_buf_offset calls
and do the type checking in the correct order.

Note that this has made no practical difference since the start of the
xfs_disk_dquot is coincident with the start of the xfs_dqblk.

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