[ox/fs] Remove inode on decLinks if links is 0
This commit is contained in:
parent
7cfe9aad8e
commit
fa3f7801d2
@ -232,7 +232,9 @@ Error FileStoreTemplate<size_t>::decLinks(InodeId_t id) {
|
||||
auto item = find(id);
|
||||
if (item.valid()) {
|
||||
item->links--;
|
||||
// TODO: remove item if links is 0
|
||||
if (item->links == 0) {
|
||||
remove(item);
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
return OxError(1);
|
||||
|
Loading…
Reference in New Issue
Block a user