diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2005-11-18 01:31:10 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2005-11-18 01:31:10 +0000 |
commit | c677f67c679ebcb29192fe8d3110bfcbb26539cc (patch) | |
tree | f1e9d42961ca2322e1ec1e58912965b3ce84dd72 /sys/kern/vfs_mount.c | |
parent | d96ec8e03d6a7f57754ab36c18a81b0298543152 (diff) | |
download | FreeBSD-src-c677f67c679ebcb29192fe8d3110bfcbb26539cc.zip FreeBSD-src-c677f67c679ebcb29192fe8d3110bfcbb26539cc.tar.gz |
In vfs_nmount(), check to see if "update" mount option was passed
in, and if so, set MNT_UPDATE filesystem flag.
vfs_nmount() calls vfs_domount(), and there is special logic
inside vfs_domount() if MNT_UPDATE is set. This is very important
when we want to do an update mount of the root filesystem, using nmount().
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index a4260f3..2c02257 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -516,6 +516,15 @@ vfs_donmount(struct thread *td, int fsflags, struct uio *fsoptions) } /* + * We need to see if we have the "update" option + * before we call vfs_domount(), since vfs_domount() has special + * logic based on MNT_UPDATE. This is very important + * when we want to update the root filesystem. + */ + if (vfs_getopt(optlist, "update", NULL, NULL) == 0) + fsflags |= MNT_UPDATE; + + /* * Be ultra-paranoid about making sure the type and fspath * variables will fit in our mp buffers, including the * terminating NUL. |