aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2004-02-12 17:54:58 +0000
committerBruce Evans <bde@FreeBSD.org>2004-02-12 17:54:58 +0000
commit67406320ff7f17aa017f1c26fe748edf04174e3b (patch)
tree9225c7741e8a8bd36cd1feec93bc404cf09eb4ac /sys/fs
parent8adff5fc123af3d831e5bfd7ad84c7c0b8d35d01 (diff)
downloadsrc-67406320ff7f17aa017f1c26fe748edf04174e3b.tar.gz
src-67406320ff7f17aa017f1c26fe748edf04174e3b.zip
MFffs (ffs_vfsops.c 1.227: clean up open mode bandaid). This reduces
gratuitous differences with ffs a little.
Notes
Notes: svn path=/head/; revision=125739
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 0b21bc1b2c10..12dd65c7200a 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -330,14 +330,15 @@ mountmsdosfs(devvp, mp, td, argp)
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
/*
- * XXX Open the device with write access even if the filesystem
- * is read-only: someone may remount it read-write later, and
- * we don't VOP_OPEN the device again in that case.
+ * XXX: open the device with read and write access even if only
+ * read access is needed now. Write access is needed if the
+ * filesystem is ever mounted read/write, and we don't change the
+ * access mode for remounts.
*/
#ifdef notyet
- error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, td, -1);
+ error = VOP_OPEN(devvp, ronly ? FREAD : FREAD | FWRITE, FSCRED, td, -1);
#else
- error = VOP_OPEN(devvp, FREAD|FWRITE, FSCRED, td, -1);
+ error = VOP_OPEN(devvp, FREAD | FWRITE, FSCRED, td, -1);
#endif
VOP_UNLOCK(devvp, 0, td);
if (error)
@@ -631,11 +632,11 @@ mountmsdosfs(devvp, mp, td, argp)
error_exit:
if (bp)
brelse(bp);
- /* XXX See comment at VOP_OPEN call */
+ /* XXX: see comment above VOP_OPEN. */
#ifdef notyet
- (void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, NOCRED, td);
+ (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, NOCRED, td);
#else
- (void) VOP_CLOSE(devvp, FREAD | FWRITE, NOCRED, td);
+ (void)VOP_CLOSE(devvp, FREAD | FWRITE, NOCRED, td);
#endif
if (pmp) {
if (pmp->pm_inusemap)
@@ -708,11 +709,11 @@ msdosfs_unmount(mp, mntflags, td)
VI_UNLOCK(vp);
}
#endif
- /* XXX See comment at VOP_OPEN call */
+ /* XXX: see comment above VOP_OPEN. */
#ifdef notyet
error = VOP_CLOSE(pmp->pm_devvp,
- (pmp->pm_flags&MSDOSFSMNT_RONLY) ? FREAD : FREAD | FWRITE,
- NOCRED, td);
+ (pmp->pm_flags & MSDOSFSMNT_RONLY) ? FREAD : FREAD | FWRITE,
+ NOCRED, td);
#else
error = VOP_CLOSE(pmp->pm_devvp, FREAD | FWRITE, NOCRED, td);
#endif