PERFORCE change 125823 for review

Xin LI delphij at FreeBSD.org
Wed Aug 29 09:49:40 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=125823

Change 125823 by delphij at 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;


More information about the p4-projects mailing list