diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-08 13:49:03 -0500 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-01-08 13:49:03 -0500 |
commit | 2b9e9b5771fdcff3d307faaade23bd4e965374da (patch) | |
tree | f1af47a003ca4b0e9ea57adb167ea767e368c3a9 /fs/xfs/scrub | |
parent | e5b37faa932d79f0c277badd0566317718648ffc (diff) |
xfs: xfs_scrub_bmap should use for_each_xfs_iext
Refactor xfs_scrub_bmap to use for_each_xfs_iext now that it exists.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 42fec0bcd9e1..0261e1133901 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c | |||
@@ -235,7 +235,6 @@ xfs_scrub_bmap( | |||
235 | struct xfs_ifork *ifp; | 235 | struct xfs_ifork *ifp; |
236 | xfs_fileoff_t endoff; | 236 | xfs_fileoff_t endoff; |
237 | struct xfs_iext_cursor icur; | 237 | struct xfs_iext_cursor icur; |
238 | bool found; | ||
239 | int error = 0; | 238 | int error = 0; |
240 | 239 | ||
241 | ifp = XFS_IFORK_PTR(ip, whichfork); | 240 | ifp = XFS_IFORK_PTR(ip, whichfork); |
@@ -314,9 +313,7 @@ xfs_scrub_bmap( | |||
314 | /* Scrub extent records. */ | 313 | /* Scrub extent records. */ |
315 | info.lastoff = 0; | 314 | info.lastoff = 0; |
316 | ifp = XFS_IFORK_PTR(ip, whichfork); | 315 | ifp = XFS_IFORK_PTR(ip, whichfork); |
317 | for (found = xfs_iext_lookup_extent(ip, ifp, 0, &icur, &irec); | 316 | for_each_xfs_iext(ifp, &icur, &irec) { |
318 | found != 0; | ||
319 | found = xfs_iext_next_extent(ifp, &icur, &irec)) { | ||
320 | if (xfs_scrub_should_terminate(sc, &error)) | 317 | if (xfs_scrub_should_terminate(sc, &error)) |
321 | break; | 318 | break; |
322 | if (isnullstartblock(irec.br_startblock)) | 319 | if (isnullstartblock(irec.br_startblock)) |