From c677f67c679ebcb29192fe8d3110bfcbb26539cc Mon Sep 17 00:00:00 2001 From: rodrigc Date: Fri, 18 Nov 2005 01:31:10 +0000 Subject: 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(). --- sys/kern/vfs_mount.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/kern/vfs_mount.c') 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. -- cgit v1.1