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
/
ufs
/
ffs
/
ufs_vfsops.c
diff --git
a/usr/src/sys/ufs/ffs/ufs_vfsops.c
b/usr/src/sys/ufs/ffs/ufs_vfsops.c
index
c11f8ff
..
0188495
100644
(file)
--- a/
usr/src/sys/ufs/ffs/ufs_vfsops.c
+++ b/
usr/src/sys/ufs/ffs/ufs_vfsops.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)ufs_vfsops.c 7.5
2
(Berkeley) %G%
+ * @(#)ufs_vfsops.c 7.5
3
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-329,10
+329,11
@@
ufs_unmount(mp, mntflags, p)
register struct fs *fs;
int i, error, ronly, flags = 0;
register struct fs *fs;
int i, error, ronly, flags = 0;
- if (mntflags & MNT_FORCE)
- return (EINVAL);
- if (mntflags & MNT_FORCE)
+ if (mntflags & MNT_FORCE)
{
+ if (mp == rootfs)
+ return (EINVAL);
flags |= FORCECLOSE;
flags |= FORCECLOSE;
+ }
mntflushbuf(mp, 0);
if (mntinvalbuf(mp))
return (EBUSY);
mntflushbuf(mp, 0);
if (mntinvalbuf(mp))
return (EBUSY);