Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs Bring back read-write to read-only mount update ...



details:   https://anonhg.NetBSD.org/src/rev/4c0b024ed8b4
branches:  trunk
changeset: 822103:4c0b024ed8b4
user:      hannken <hannken%NetBSD.org@localhost>
date:      Wed Mar 01 10:46:43 2017 +0000

description:
Bring back read-write to read-only mount update for ffs.

diffstat:

 sys/ufs/ffs/ffs_vfsops.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r c221f22f796c -r 4c0b024ed8b4 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c  Wed Mar 01 10:46:05 2017 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c  Wed Mar 01 10:46:43 2017 +0000
@@ -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 @@
 
                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 @@
                }
 #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 @@
        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;



Home | Main Index | Thread Index | Old Index