From bcc4260f3bc7ead8e8472e4cb091857092745ce1 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Thu, 3 Aug 2006 03:55:52 +0000 Subject: When the volume is being downgraded from a read-write mode, mark it as clean. PR: kern/85366 Submitted by: Dan Lukes MFC After: 2 weeks --- sys/fs/msdosfs/msdosfs_vfsops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index c9efa9005620..a485632d3d1f 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -283,6 +283,10 @@ msdosfs_mount(struct mount *mp, struct thread *td) g_access(pmp->pm_cp, 0, -1, 0); g_topology_unlock(); PICKUP_GIANT(); + /* Now the volume is clean. Mark it. */ + error = markvoldirty(pmp, 0); + if (error && (flags & FORCECLOSE) == 0) + return (error); } else if ((pmp->pm_flags & MSDOSFSMNT_RONLY) && !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { /* -- cgit v1.3