aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2004-02-12 16:52:24 +0000
committerBruce Evans <bde@FreeBSD.org>2004-02-12 16:52:24 +0000
commit8adff5fc123af3d831e5bfd7ad84c7c0b8d35d01 (patch)
treed177a6394d8ddd2665382d2314d4f9e577a30868 /sys
parentbcaf9acc4959c072552250359a61f67b7ed4b1bd (diff)
downloadsrc-8adff5fc123af3d831e5bfd7ad84c7c0b8d35d01.tar.gz
src-8adff5fc123af3d831e5bfd7ad84c7c0b8d35d01.zip
Fixed some minor style bugs (English usage and formatting of binary
operators) in and near revs.1.169-1.170 (open mode bandaid). This (or better a proper fix) should have been done before cloning the bandaid to many other file systems.
Notes
Notes: svn path=/head/; revision=125738
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 9e27c2cf2de8..6996a93907c6 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -610,14 +610,15 @@ ffs_mountfs(devvp, mp, td)
ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
/*
- * XXX: We don't re-VOP_OPEN in FREAD|FWRITE mode if the filesystem
- * XXX: is subsequently remounted, so open it FREAD|FWRITE from the
- * XXX: start to avoid getting trashed later on.
+ * 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)
@@ -830,11 +831,11 @@ out:
devvp->v_rdev->si_mountpoint = NULL;
if (bp)
brelse(bp);
- /* XXX: see comment above VOP_OPEN */
+ /* XXX: see comment above VOP_OPEN. */
#ifdef notyet
- (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, td);
+ (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD | FWRITE, cred, td);
#else
- (void)VOP_CLOSE(devvp, FREAD|FWRITE, cred, td);
+ (void)VOP_CLOSE(devvp, FREAD | FWRITE, cred, td);
#endif
if (ump) {
free(ump->um_fs, M_UFSMNT);
@@ -990,12 +991,12 @@ ffs_unmount(mp, mntflags, td)
ump->um_devvp->v_rdev->si_mountpoint = NULL;
vinvalbuf(ump->um_devvp, V_SAVE, NOCRED, td, 0, 0);
- /* XXX: see comment above VOP_OPEN */
+ /* XXX: see comment above VOP_OPEN. */
#ifdef notyet
- error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,
- NOCRED, td);
+ error = VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD | FWRITE,
+ NOCRED, td);
#else
- error = VOP_CLOSE(ump->um_devvp, FREAD|FWRITE, NOCRED, td);
+ error = VOP_CLOSE(ump->um_devvp, FREAD | FWRITE, NOCRED, td);
#endif
vrele(ump->um_devvp);