Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests.
Noted by: bde MFC after: 1 week
This commit is contained in:
parent
77a117ca28
commit
2aacee7779
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231998
@ -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))));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
@ -1249,7 +1249,7 @@ msdosfs_rename(ap)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user