From 600b3099b9825d4ef1aac93a669764a933cd8c41 Mon Sep 17 00:00:00 2001 From: mckusick Date: Tue, 22 Oct 2019 22:23:59 +0000 Subject: [PATCH] Replace an uninitialized variable with the correct element from the superblock when doing recovery with journalled soft updates. Reported by: Chuck Silvers MFC after: 3 days Sponsored by: Netflix --- sbin/fsck_ffs/suj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index d77ad44a1369..0391f327c0f1 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -1555,7 +1555,7 @@ ino_trunc(ino_t ino, off_t size) /* If we freed everything in this indirect free the indir. */ if (lastlbn > lbn) continue; - blk_free(DIP(ip, di_ib[i]), 0, frags); + blk_free(DIP(ip, di_ib[i]), 0, fs->fs_frag); DIP_SET(ip, di_ib[i], 0); } ino_dirty(ino);