Author: kib Date: Wed Feb 22 13:01:17 2012 New Revision: 231998 URL: http://svn.freebsd.org/changeset/base/231998
Log: Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests. Noted by: bde MFC after: 1 week Modified: head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 22 13:01:17 2012 (r231998) @@ -431,7 +431,7 @@ detrunc(dep, length, flags, cred, td) if (allerror) printf("detrunc(): vtruncbuf error %d\n", allerror); #endif - error = deupdat(dep, !(DETOV(dep)->v_mount->mnt_flag & MNT_ASYNC)); + error = deupdat(dep, !DOINGASYNC((DETOV(dep)))); if (error != 0 && allerror == 0) allerror = error; #ifdef MSDOSFS_DEBUG @@ -510,7 +510,7 @@ deextend(dep, length, cred) } dep->de_FileSize = length; dep->de_flag |= DE_UPDATE | DE_MODIFIED; - return (deupdat(dep, !(DETOV(dep)->v_mount->mnt_flag & MNT_ASYNC))); + return (deupdat(dep, !DOINGASYNC(DETOV(dep)))); } /* Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 22 13:01:17 2012 (r231998) @@ -690,7 +690,7 @@ createde(dep, ddep, depp, cnp) while (--ddep->de_fndcnt >= 0) { if (!(ddep->de_fndoffset & pmp->pm_crbomask)) { - if (DETOV(ddep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(ddep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; @@ -720,7 +720,7 @@ createde(dep, ddep, depp, cnp) } } - if (DETOV(ddep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(ddep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; @@ -1022,7 +1022,7 @@ removede(pdep, dep) || ep->deAttributes != ATTR_WIN95) break; } - if (DETOV(pdep)->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(DETOV(pdep))) bdwrite(bp); else if ((error = bwrite(bp)) != 0) return error; Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 22 09:08:51 2012 (r231997) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 22 13:01:17 2012 (r231998) @@ -1249,7 +1249,7 @@ abortit: putushort(dotdotp->deStartCluster, dp->de_StartCluster); if (FAT32(pmp)) putushort(dotdotp->deHighClust, dp->de_StartCluster >> 16); - if (fvp->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(fvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) { /* XXX should downgrade to ro here, fs is corrupt */ @@ -1383,7 +1383,7 @@ msdosfs_mkdir(ap) putushort(denp[1].deHighClust, pdep->de_StartCluster >> 16); } - if (ap->a_dvp->v_mount->mnt_flag & MNT_ASYNC) + if (DOINGASYNC(ap->a_dvp)) bdwrite(bp); else if ((error = bwrite(bp)) != 0) goto bad; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"