mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +00:00
Set st_nlink in the stat structure within the inode to 1 as well.
The cd9660 file system uses that field for the link count and it was 0. This impacts pwd_mkdb(8) as it checks for st_nlink not being 0 as part of closing a race.
This commit is contained in:
parent
37b983c09b
commit
a92b168892
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=250605
@ -1050,6 +1050,7 @@ read_mtree(const char *fname, fsnode *node)
|
||||
bzero(&mtree_global_inode, sizeof(mtree_global_inode));
|
||||
mtree_global.inode = &mtree_global_inode;
|
||||
mtree_global_inode.nlink = 1;
|
||||
mtree_global_inode.st.st_nlink = 1;
|
||||
mtree_global_inode.st.st_atime = mtree_global_inode.st.st_ctime =
|
||||
mtree_global_inode.st.st_mtime = time(NULL);
|
||||
errors = warnings = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user