]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_scrub: collapse trim_filesystem
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:12 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:09 +0000 (17:01 -0700)
Collapse this two-line helper into the main function since it's trivial.

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

index 07726b5b86913d0a8d0279084dbe94220e517165..e577260a93dda1477bba7d5ae7cf20cb728ea088 100644 (file)
 
 /* Phase 8: Trim filesystem. */
 
-/* Trim the unused areas of the filesystem if the caller asked us to. */
-static void
-trim_filesystem(
-       struct scrub_ctx        *ctx)
-{
-       fstrim(ctx);
-       progress_add(1);
-}
-
 /* Trim the filesystem, if desired. */
 int
 phase8_func(
@@ -47,7 +38,8 @@ phase8_func(
                return 0;
 
 maybe_trim:
-       trim_filesystem(ctx);
+       fstrim(ctx);
+       progress_add(1);
        return 0;
 }