aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2007-01-06 22:17:15 +0000
committerCraig Rodrigues <rodrigc@FreeBSD.org>2007-01-06 22:17:15 +0000
commit7696740c99a75a7fe575eca82df91f4a1e44b641 (patch)
tree55a7aea3dc039713e606ffe0b3093c0e6182c789 /sys/fs
parent286bffd35088f02111b7e1134e12ae5fdf55816d (diff)
Notes
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index a5656770d8f6..a273e747d95f 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -255,6 +255,7 @@ msdosfs_mount(struct mount *mp, struct thread *td)
* read/write; if there is no device name, that's all we do.
*/
if (mp->mnt_flag & MNT_UPDATE) {
+ int ro_to_rw = 0;
pmp = VFSTOMSDOSFS(mp);
if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) {
@@ -310,15 +311,20 @@ msdosfs_mount(struct mount *mp, struct thread *td)
if (error)
return (error);
- /* Now that the volume is modifiable, mark it dirty. */
- error = markvoldirty(pmp, 1);
- if (error)
- return (error);
+ ro_to_rw = 1;
}
vfs_flagopt(mp->mnt_optnew, "ro",
&pmp->pm_flags, MSDOSFSMNT_RONLY);
vfs_flagopt(mp->mnt_optnew, "ro",
&mp->mnt_flag, MNT_RDONLY);
+
+ if (ro_to_rw) {
+ /* Now that the volume is modifiable, mark it dirty. */
+ error = markvoldirty(pmp, 1);
+ if (error)
+ return (error);
+ }
+
if (vfs_getopt(mp->mnt_optnew, "from", NULL, NULL)) {
#ifdef __notyet__ /* doesn't work correctly with current mountd XXX */
if (args.flags & MSDOSFSMNT_MNTOPT) {