summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2016-04-03 14:38:02 +0000
committermav <mav@FreeBSD.org>2016-04-03 14:38:02 +0000
commit9e293a9e32a57c9a05734c0213a3c609ca4dec68 (patch)
tree1fde4b9289fcff3fa24220fb0a47b593558e5221 /sys/fs
parent238b2f4322eb16bdc6bf9b3a137401599a20cd02 (diff)
downloadFreeBSD-src-9e293a9e32a57c9a05734c0213a3c609ca4dec68.zip
FreeBSD-src-9e293a9e32a57c9a05734c0213a3c609ca4dec68.tar.gz
MFC r287109 (by trasz): Make it possible to forcibly unmount devfs.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/devfs/devfs_vfsops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c
index 85ff158..c704c5e 100644
--- a/sys/fs/devfs/devfs_vfsops.c
+++ b/sys/fs/devfs/devfs_vfsops.c
@@ -182,6 +182,8 @@ devfs_unmount(struct mount *mp, int mntflags)
fmp = VFSTODEVFS(mp);
KASSERT(fmp->dm_mount != NULL,
("devfs_unmount unmounted devfs_mount"));
+ if (mntflags & MNT_FORCE)
+ flags |= FORCECLOSE;
/* There is 1 extra root vnode reference from devfs_mount(). */
error = vflush(mp, 1, flags, curthread);
if (error)
OpenPOWER on IntegriCloud