summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-02-22 13:01:17 +0000
committerkib <kib@FreeBSD.org>2012-02-22 13:01:17 +0000
commit311bc737d859452ad0514fe48c005bcefcbc3eda (patch)
treecd1043b04193451658ec2433680319290a5056f6 /sys/fs
parent55ea20f202575d6359b3073ecc07b86d105f1487 (diff)
downloadFreeBSD-src-311bc737d859452ad0514fe48c005bcefcbc3eda.zip
FreeBSD-src-311bc737d859452ad0514fe48c005bcefcbc3eda.tar.gz
Use DOINGASYNC() to test for async allowance, to honor VFS syncing requests.
Noted by: bde MFC after: 1 week
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_denode.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c6
-rw-r--r--sys/fs/msdosfs/msdosfs_vnops.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c
index 1166be7..40ec873 100644
--- a/sys/fs/msdosfs/msdosfs_denode.c
+++ b/sys/fs/msdosfs/msdosfs_denode.c
@@ -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))));
}
/*
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index ceced73..b3f52ce 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -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;
diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c
index 2c0920d..838baf7 100644
--- a/sys/fs/msdosfs/msdosfs_vnops.c
+++ b/sys/fs/msdosfs/msdosfs_vnops.c
@@ -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;
OpenPOWER on IntegriCloud