diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-02-07 22:13:56 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-02-07 22:13:56 +0000 |
commit | 88b4f0b921d83624fa802c6d54942952ce05815b (patch) | |
tree | 99b0867814095cff2c8b6159755a613bda06a1fa /sys/ufs | |
parent | f5604f20858338a28a87f06fdcc3773511f51522 (diff) | |
download | FreeBSD-src-88b4f0b921d83624fa802c6d54942952ce05815b.zip FreeBSD-src-88b4f0b921d83624fa802c6d54942952ce05815b.tar.gz |
Occationally background fsck would cause a spurious ``freeing free
inode'' panic. This change corrects that problem by setting the
fs_active flag when the inode map changes to notify the snapshot
code that the cylinder group must be rescanned.
Submitted by: Robert Watson <rwatson@FreeBSD.org>
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index 79fcb91..93e8c99 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1416,6 +1416,8 @@ gotit: fs->fs_cstotal.cs_ndir++; fs->fs_cs(fs, cg).cs_ndir++; } + if (fs->fs_active != 0) + atomic_clear_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg)); bdwrite(bp); return (cg * fs->fs_ipg + ipref); } @@ -1684,6 +1686,8 @@ ffs_freefile(fs, devvp, ino, mode) fs->fs_cs(fs, cg).cs_ndir--; } fs->fs_fmod = 1; + if (fs->fs_active != 0) + atomic_clear_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg)); bdwrite(bp); return (0); } |