summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2008-08-23 01:16:09 +0000
committerrodrigc <rodrigc@FreeBSD.org>2008-08-23 01:16:09 +0000
commitbef9b4336cb70a6fffae39cb00904842934aa533 (patch)
tree8db79e6fecc18aaec8e5b567b3207e3ddba6be03 /sys/kern/vfs_mount.c
parentdf8989694aac0a70bc98cc1bb99a9bd557f441b7 (diff)
downloadFreeBSD-src-bef9b4336cb70a6fffae39cb00904842934aa533.zip
FreeBSD-src-bef9b4336cb70a6fffae39cb00904842934aa533.tar.gz
In nmount(), when we see the "force" option,
set the MNT_FORCE flag, but do not persist "force" in the options list, since it is a command, not a persistent property of a mount. Similarly, when we see "reload", set MNT_RELOAD, but delete "reload" from the options list. MFC after: 1 week
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 906ea18..ebee84b 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -640,8 +640,14 @@ vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions)
}
else if (strcmp(opt->name, "async") == 0)
fsflags |= MNT_ASYNC;
- else if (strcmp(opt->name, "force") == 0)
+ else if (strcmp(opt->name, "force") == 0) {
fsflags |= MNT_FORCE;
+ vfs_freeopt(optlist, opt);
+ }
+ else if (strcmp(opt->name, "reload") == 0) {
+ fsflags |= MNT_RELOAD;
+ vfs_freeopt(optlist, opt);
+ }
else if (strcmp(opt->name, "multilabel") == 0)
fsflags |= MNT_MULTILABEL;
else if (strcmp(opt->name, "noasync") == 0)
OpenPOWER on IntegriCloud