aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_filedesc.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-21 22:15:27 -0400
committerIan Moffett <ian@osmora.org>2024-05-21 22:15:27 -0400
commit9a4ec7539041f9ff25b947b2716aded028c0291f (patch)
tree2873062f44972cc4e023df8a481357cb9288802d /sys/kern/kern_filedesc.c
parent8d49b45994abba0257a2ae351297bea33d51c07a (diff)
kernel: vfs: Add support for close VOP
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/kern_filedesc.c')
-rw-r--r--sys/kern/kern_filedesc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c
index 74ab859..ec0aee7 100644
--- a/sys/kern/kern_filedesc.c
+++ b/sys/kern/kern_filedesc.c
@@ -211,6 +211,10 @@ fd_close_fdnum(struct proc *td, int fdno)
return;
}
+ if (fd->vnode != NULL) {
+ vfs_close(fd->vnode);
+ }
+
dynfree(fd);
td->fds[fdno] = NULL;
}