From bbc4eeea0da272c704f00a23fe08bc6ddc021922 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 28 Jun 2024 23:18:30 -0400 Subject: kernel: vfs: Don't destroy vnode if error Signed-off-by: Ian Moffett --- sys/kern/vfs_subr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern') 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; -- cgit v1.2.3