The doforce variable isn't modified anywhere. Also, the only filesystem
left using it is fuse. It has been removed from all other filesystems.
Ok to remove?
natano
Index: kern/vfs_subr.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.246
diff -u -p -r1.246 vfs_subr.c
--- kern/vfs_subr.c 26 Apr 2016 18:23:07 -0000 1.246
+++ kern/vfs_subr.c 26 May 2016 15:23:02 -0000
@@ -84,7 +84,6 @@ int vttoif_tab[9] = {
S_IFSOCK, S_IFIFO, S_IFMT,
};
-int doforce = 1; /* 1 => permit forcible unmounting */
int prtactive = 0; /* 1 => print out reclaim of active vnodes */
int suid_clear = 1; /* 1 => clear SUID / SGID on owner change */
Index: miscfs/fuse/fuse_vfsops.c
===================================================================
RCS file: /cvs/src/sys/miscfs/fuse/fuse_vfsops.c,v
retrieving revision 1.21
diff -u -p -r1.21 fuse_vfsops.c
--- miscfs/fuse/fuse_vfsops.c 26 Apr 2016 18:37:02 -0000 1.21
+++ miscfs/fuse/fuse_vfsops.c 26 May 2016 15:23:02 -0000
@@ -135,19 +135,13 @@ fusefs_unmount(struct mount *mp, int mnt
{
struct fusefs_mnt *fmp;
struct fusebuf *fbuf;
- extern int doforce;
int flags = 0;
int error;
fmp = VFSTOFUSEFS(mp);
- if (mntflags & MNT_FORCE) {
- /* fusefs can never be rootfs so don't check for it */
- if (!doforce)
- return (EINVAL);
-
+ if (mntflags & MNT_FORCE)
flags |= FORCECLOSE;
- }
if ((error = vflush(mp, NULLVP, flags)))
return (error);