Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Aug 2007 16:49:38 GMT
From:      Xin LI <delphij@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 125823 for review
Message-ID:  <200708291649.l7TGncOd089982@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125823

Change 125823 by delphij@charlie on 2007/08/29 16:49:25

	During umount(), we could bail out because the clean flag was failed
	to write.  We have to do this *before* freeing iconv stuff, restoring
	the pre-umount state is not trivial.
	
	Submitted by:	bde

Affected files ...

.. //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#7 edit

Differences ...

==== //depot/projects/delphij_fork/sys/fs/msdosfs/msdosfs_vfsops.c#7 (text+ko) ====

@@ -766,6 +766,15 @@
 	if (error)
 		return error;
 	pmp = VFSTOMSDOSFS(mp);
+
+	if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) {
+		error = markvoldirty(pmp, 0);
+		if (error) {
+			(void)markvoldirty(pmp, 1);
+			return (error);
+		}
+	} 
+
 	if (pmp->pm_flags & MSDOSFSMNT_KICONV && msdosfs_iconv) {
 		if (pmp->pm_w2u)
 			msdosfs_iconv->close(pmp->pm_w2u);
@@ -776,13 +785,6 @@
 		if (pmp->pm_u2d)
 			msdosfs_iconv->close(pmp->pm_u2d);
 	}
-
-	/* If the volume was mounted read/write, mark it clean now. */
-	if ((pmp->pm_flags & MSDOSFSMNT_RONLY) == 0) {
-		error = markvoldirty(pmp, 0);
-		if (error && (flags & FORCECLOSE) == 0)
-			return (error);
-	}
 #ifdef MSDOSFS_DEBUG
 	{
 		struct vnode *vp = pmp->pm_devvp;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708291649.l7TGncOd089982>