]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: fix superfluous clearing of info->low in __xfs_getfsmap_datadev
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Nov 2024 04:18:25 +0000 (20:18 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:23 +0000 (13:38 -0800)
commitcd8ae42a82d2d71627a08c33a673ac735e0508ee
tree9e213efc4a5d1b2d008ca4730b8ec3316bfb57dc
parent62027820eb4486f075b89ec31c1548c6cb1bb13f
xfs: fix superfluous clearing of info->low in __xfs_getfsmap_datadev

The for_each_perag helpers update the agno passed in for each iteration,
and thus the "if (pag->pag_agno == start_ag)" check will always be true.

Add another variable for the loop iterator so that the field is only
cleared after the first iteration.

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