aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_init.c
diff options
context:
space:
mode:
authorMarvin Ma <marvin.ma@dell.com>2022-02-25 15:34:33 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2022-02-25 18:19:14 +0000
commit1517b8d5a7f58897200497811de1b18809c07d3e (patch)
tree95cd5b2952c0b59917fde47fc39ea75c3642999e /sys/kern/vfs_init.c
parentf00ced06da25540c2057e46033d1c38b4ade7c8b (diff)
downloadsrc-1517b8d5a7f58897200497811de1b18809c07d3e.tar.gz
src-1517b8d5a7f58897200497811de1b18809c07d3e.zip
vfs_unregister: fix error handling
Due to misplaced braces, an error from vfs_uninit() in the VFCF_SBDRY case was ignored. Reported by: Anton Rang <rang@acm.org> Reviewed by: Anton Rang <rang@acm.org>, markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D34375
Diffstat (limited to 'sys/kern/vfs_init.c')
-rw-r--r--sys/kern/vfs_init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c
index 112b4c76e575..612cc06a0db7 100644
--- a/sys/kern/vfs_init.c
+++ b/sys/kern/vfs_init.c
@@ -547,14 +547,13 @@ vfs_unregister(struct vfsconf *vfc)
if (vfc->vfc_vfsops_sd->vfs_uninit != NULL)
error = vfc->vfc_vfsops_sd->vfs_uninit(vfsp);
} else {
- if (vfc->vfc_vfsops->vfs_uninit != NULL) {
+ if (vfc->vfc_vfsops->vfs_uninit != NULL)
error = vfc->vfc_vfsops->vfs_uninit(vfsp);
}
if (error != 0) {
vfsconf_unlock();
return (error);
}
- }
TAILQ_REMOVE(&vfsconf, vfsp, vfc_list);
maxtypenum = VFS_GENERIC;
TAILQ_FOREACH(vfsp, &vfsconf, vfc_list)