kernel: Fix inode link counting in tmpfs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
db2963d7bf
commit
f5aed95b8b
@ -27,7 +27,7 @@ namespace VFS
|
||||
ino_t inum;
|
||||
size_t size { 0 };
|
||||
mode_t mode;
|
||||
nlink_t nlinks { 1 };
|
||||
nlink_t nlinks { 0 };
|
||||
uid_t uid { 0 };
|
||||
gid_t gid { 0 };
|
||||
dev_t devid { 0 };
|
||||
|
@ -269,10 +269,12 @@ namespace TmpFS
|
||||
|
||||
void did_link() override
|
||||
{
|
||||
m_metadata.nlinks++;
|
||||
}
|
||||
|
||||
void did_unlink() override
|
||||
{
|
||||
m_metadata.nlinks--;
|
||||
m_self = {};
|
||||
m_entries.clear();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user