mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
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
This commit is contained in:
parent
f2107e8d54
commit
448434c3c9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150891
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user