Author: kib Date: Wed Feb 29 01:36:00 2012 New Revision: 232283 URL: http://svn.freebsd.org/changeset/base/232283
Log: MFC r231998: Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests. Modified: stable/9/sys/fs/msdosfs/msdosfs_denode.c stable/9/sys/fs/msdosfs/msdosfs_lookup.c stable/9/sys/fs/msdosfs/msdosfs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 29 01:35:21 2012 (r232282) +++ stable/9/sys/fs/msdosfs/msdosfs_denode.c Wed Feb 29 01:36:00 2012 (r232283) @@ -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: stable/9/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 29 01:35:21 2012 (r232282) +++ stable/9/sys/fs/msdosfs/msdosfs_lookup.c Wed Feb 29 01:36:00 2012 (r232283) @@ -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: stable/9/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- stable/9/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 29 01:35:21 2012 (r232282) +++ stable/9/sys/fs/msdosfs/msdosfs_vnops.c Wed Feb 29 01:36:00 2012 (r232283) @@ -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-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"