summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-06-28 23:18:30 -0400
committerIan Moffett <ian@osmora.org>2024-06-28 23:18:30 -0400
commitbbc4eeea0da272c704f00a23fe08bc6ddc021922 (patch)
tree8151e0530be76dab1d8f2de99a6188e612dbdb9d /sys/kern/vfs_subr.c
parent45ab1dd925162659d59d65a95105120d9dc96978 (diff)
kernel: vfs: Don't destroy vnode if error
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 850961e..b732cb4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -85,6 +85,8 @@ vfs_release_vnode(struct vnode *vp)
return -EINVAL;
if (vops->reclaim != NULL)
status = vops->reclaim(vp);
+ if (status != 0)
+ return status;
dynfree(vp);
return status;