Module Name: src
Committed By: hannken
Date: Wed Mar 1 10:46:43 UTC 2017
Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c
Log Message:
Bring back read-write to read-only mount update for ffs.
To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/sys/ufs/ffs/ffs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.347 src/sys/ufs/ffs/ffs_vfsops.c:1.348
--- src/sys/ufs/ffs/ffs_vfsops.c:1.347 Wed Mar 1 10:42:45 2017
+++ src/sys/ufs/ffs/ffs_vfsops.c Wed Mar 1 10:46:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.347 2017/03/01 10:42:45 hannken Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.348 2017/03/01 10:46:43 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.347 2017/03/01 10:42:45 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.348 2017/03/01 10:46:43 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -564,7 +564,7 @@ ffs_mount(struct mount *mp, const char *
ump = VFSTOUFS(mp);
fs = ump->um_fs;
- if (fs->fs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
+ if (fs->fs_ronly == 0 && (mp->mnt_iflag & IMNT_WANTRDONLY)) {
/*
* Changing from r/w to r/o
*/
@@ -599,7 +599,7 @@ ffs_mount(struct mount *mp, const char *
}
#endif /* WAPBL */
- if (fs->fs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
+ if (fs->fs_ronly == 0 && (mp->mnt_iflag & IMNT_WANTRDONLY)) {
/*
* Finish change from r/w to r/o
*/
@@ -1455,7 +1455,7 @@ ffs_mountfs(struct vnode *devvp, struct
mp->mnt_fs_bshift = fs->fs_bshift;
mp->mnt_dev_bshift = DEV_BSHIFT; /* XXX */
mp->mnt_flag |= MNT_LOCAL;
- mp->mnt_iflag |= IMNT_MPSAFE;
+ mp->mnt_iflag |= IMNT_MPSAFE | IMNT_CAN_RWTORO;
#ifdef FFS_EI
if (needswap)
ump->um_flags |= UFS_NEEDSWAP;