summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2005-10-03 21:57:43 +0000
committertruckman <truckman@FreeBSD.org>2005-10-03 21:57:43 +0000
commit12c8814c4626cae198759b6669ede20afcd22c90 (patch)
tree2b32324344d6e40447ba465fad6c7df80103663f /sys/ufs
parent2cc06a19bc0bbe4a6b67dc95ad183b4dc492c56c (diff)
downloadFreeBSD-src-12c8814c4626cae198759b6669ede20afcd22c90.zip
FreeBSD-src-12c8814c4626cae198759b6669ede20afcd22c90.tar.gz
Initialize the inode i_flag field in ffs_valloc() to clean up any
stale flag bits left over from before the inode was recycled. Without this change, a leftover IN_SPACECOUNTED flag could prevent softdep_freefile() and softdep_releasefile() from incrementing fs_pendinginodes. Because handle_workitem_freefile() unconditionally decrements fs_pendinginodes, a negative value could be reported at file system unmount time with a message like: unmount pending error: blocks 0 files -3 The pending block count in fs_pendingblocks could also be negative for similar reasons. These errors can cause the data returned by statfs() to be slightly incorrect. Some other cleanup code in softdep_releasefile() could also be incorrectly bypassed. MFC after: 3 days
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index f5583a6..88f428e 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -950,6 +950,7 @@ ffs_valloc(pvp, mode, cred, vpp)
ip->i_din2->di_birthtime = ts.tv_sec;
ip->i_din2->di_birthnsec = ts.tv_nsec;
}
+ ip->i_flag = 0;
return (0);
noinodes:
UFS_UNLOCK(ump);
OpenPOWER on IntegriCloud