summaryrefslogtreecommitdiffstats
path: root/sys/fs/msdosfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-02-01 18:30:41 +0000
committerkib <kib@FreeBSD.org>2013-02-01 18:30:41 +0000
commit5e07d49c626dea51d672ea9d9bd1499e0ae8eb29 (patch)
treee288b5f31da80c7463066ebc4fccaa97f0c2afc7 /sys/fs/msdosfs
parent35907051bb7af5a3d9532671d959a88be064bce7 (diff)
downloadFreeBSD-src-5e07d49c626dea51d672ea9d9bd1499e0ae8eb29.zip
FreeBSD-src-5e07d49c626dea51d672ea9d9bd1499e0ae8eb29.tar.gz
The MSDOSFSMNT_WAITONFAT flag is bogus and broken. It does less than
track the MNT_SYNCHRONOUS flag. It is set to the latter at mount time but not updated by MNT_UPDATE. Use MNT_SYNCHRONOUS to decide to write the FAT updates syncrhonously. Submitted by: bde MFC after: 1 week
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index 9cb7634..3994042 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -379,7 +379,7 @@ updatefats(pmp, bp, fatbn)
((u_int8_t *)bpn->b_data)[3] |= 0x80;
else if (cleanfat == 32)
((u_int8_t *)bpn->b_data)[7] |= 0x08;
- if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT)
+ if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS)
bwrite(bpn);
else
bdwrite(bpn);
@@ -389,7 +389,7 @@ updatefats(pmp, bp, fatbn)
/*
* Write out the first (or current) fat last.
*/
- if (pmp->pm_flags & MSDOSFSMNT_WAITONFAT)
+ if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS)
bwrite(bp);
else
bdwrite(bp);
OpenPOWER on IntegriCloud