projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
enable forcible unmount
[unix-history]
/
usr
/
src
/
sys
/
nfs
/
nfs_vfsops.c
diff --git
a/usr/src/sys/nfs/nfs_vfsops.c
b/usr/src/sys/nfs/nfs_vfsops.c
index
774b73c
..
c1c9394
100644
(file)
--- a/
usr/src/sys/nfs/nfs_vfsops.c
+++ b/
usr/src/sys/nfs/nfs_vfsops.c
@@
-7,7
+7,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)nfs_vfsops.c 7.2
7
(Berkeley) %G%
+ * @(#)nfs_vfsops.c 7.2
8
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-432,10
+432,11
@@
nfs_unmount(mp, mntflags, p)
int flags = 0;
int error;
int flags = 0;
int error;
- if (mntflags & MNT_FORCE)
- return (EINVAL);
- if (mntflags & MNT_FORCE)
+ if (mntflags & MNT_FORCE)
{
+ if (mp == rootfs)
+ return (EINVAL);
flags |= FORCECLOSE;
flags |= FORCECLOSE;
+ }
nmp = VFSTONFS(mp);
/*
* Clear out the buffer cache
nmp = VFSTONFS(mp);
/*
* Clear out the buffer cache