vfs: refcount file structs used in fdescs

This commit is contained in:
Michael Shaw 2024-08-21 15:44:50 -04:00
commit 02c0a70a30
5 changed files with 22 additions and 4 deletions

View file

@ -65,6 +65,7 @@ struct file *vfs_open(const char *pathname, int *err)
{
/* allocate a file */
struct file *file = slab_alloc(file_slab);
if (!file) {
kprintf(LOG_ERROR "Failed to allocate file struct\n");
return NULL;