diff options
| author | dholland <dholland@NetBSD.org> | 2015-09-01 06:12:04 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2015-09-01 06:12:04 +0000 |
| commit | 3f43d41f5c567f5cdebf958913edce180afc2f20 (patch) | |
| tree | 8fbafc6cb74129228f8c17c5efa39bba345e01e2 /libexec | |
| parent | a74c521c3940adcdd2ddc7a37e2617cd65bdca84 (diff) | |
The ifile's inode number is constant. (it is always 1)
Therefore, storing the value in the superblock and reading it out
again is silly and offers the opportunity for it to become corrupted.
So, don't do that (most of the code already didn't) and use the
existing constant instead. Initialize new 32-bit superblocks with
the value for the sake of old userland programs, but don't keep the
value in the 64-bit superblock at all.
(approved by Margo Seltzer)
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/lfs_cleanerd/lfs_cleanerd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/lfs_cleanerd/lfs_cleanerd.c b/libexec/lfs_cleanerd/lfs_cleanerd.c index f39c0e442d0..a6bffd64270 100644 --- a/libexec/lfs_cleanerd/lfs_cleanerd.c +++ b/libexec/lfs_cleanerd/lfs_cleanerd.c @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_cleanerd.c,v 1.51 2015/09/01 06:10:16 dholland Exp $ */ +/* $NetBSD: lfs_cleanerd.c,v 1.52 2015/09/01 06:12:04 dholland Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -1017,10 +1017,10 @@ check_hidden_cost(struct clfs *fs, BLOCK_INFO *bip, int bic, off_t *ifc) /* * Look for IFILE blocks, unless this is the Ifile. */ - if (bip[i].bi_inode != lfs_sb_getifile(fs)) { + if (bip[i].bi_inode != LFS_IFILE_INUM) { lbn = lfs_sb_getcleansz(fs) + bip[i].bi_inode / lfs_sb_getifpb(fs); - *ifc += check_or_add(lfs_sb_getifile(fs), lbn, + *ifc += check_or_add(LFS_IFILE_INUM, lbn, bip, bic, &ebip, &ebic); } } |
