From f946e1f195ebca6b2391bb3f106756e1f1cc08e0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 29 Jul 2022 21:38:26 +0200 Subject: [PATCH] Revert "Fix unused variable warning in ffs_snapshot.c" This reverts commit 6ef6d3424f158a797d280ebd3103d4d833d41230. The ffs_snapshot.c code in stable/12 is pretty far behind, and merging all the additional changesets needed is too much churn. --- sys/ufs/ffs/ffs_snapshot.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 1700a4094ae7..a65616fd04e0 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -214,10 +214,7 @@ ffs_snapshot(mp, snapfile) uint64_t flag; struct timespec starttime = {0, 0}, endtime; char saved_nice = 0; -#ifdef DIAGNOSTIC - long redo = 0; -#endif - long snaplistsize = 0; + long redo = 0, snaplistsize = 0; int32_t *lp; void *space; struct fs *copy_fs = NULL, *fs; @@ -460,9 +457,7 @@ restart: for (cg = 0; cg < fs->fs_ncg; cg++) { if ((ACTIVECGNUM(fs, cg) & ACTIVECGOFF(cg)) != 0) continue; -#ifdef DIAGNOSTIC redo++; -#endif error = UFS_BALLOC(vp, lfragtosize(fs, cgtod(fs, cg)), fs->fs_bsize, KERNCRED, 0, &nbp); if (error)