diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-05-20 16:03:47 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2006-05-20 16:03:47 +0000 |
commit | 9cca34c495ae9597c80892ca37b45ae1fa2feb8d (patch) | |
tree | 95d328e0837c342b464496993630ea7e8cf02edc /sys/ufs | |
parent | 5d18177ac26e330840db323841ef906338323285 (diff) |
Don't mark a mount point read-only if we are about to sync it, otherwise
stuff that relies on ffs_update() to flush an inode will fail.
Fixes PR 4997, okay tedu@
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 72b1ad99415..e2bfd0f7f75 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vfsops.c,v 1.92 2006/04/19 11:55:55 pedro Exp $ */ +/* $OpenBSD: ffs_vfsops.c,v 1.93 2006/05/20 16:03:46 pedro Exp $ */ /* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */ /* @@ -203,10 +203,11 @@ ffs_mount(struct mount *mp, const char *path, void *data, ronly = fs->fs_ronly; if (ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) { - /* - * Flush any dirty data. - */ + /* Flush any dirty data */ + mp->mnt_flag &= ~MNT_RDONLY; VFS_SYNC(mp, MNT_WAIT, p->p_ucred, p); + mp->mnt_flag |= MNT_RDONLY; + /* * Get rid of files open for writing. */ |