Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ext2fs Pull a fix for mount function from ffs_vfsops...
details: https://anonhg.NetBSD.org/src/rev/d0cc349dbc07
branches: trunk
changeset: 747351:d0cc349dbc07
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sat Sep 12 01:43:52 2009 +0000
description:
Pull a fix for mount function from ffs_vfsops.c rev1.186:
> Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
> instead of just vnode pointers. Fixes erroneous "does not match mounted
> device" errors from mount(8) in the presence of MFS /dev, init.root, &c.
diffstat:
sys/ufs/ext2fs/ext2fs_vfsops.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 130b9945df48 -r d0cc349dbc07 sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Sep 11 23:22:28 2009 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Sat Sep 12 01:43:52 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.145 2009/09/11 15:59:07 tsutsui Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.146 2009/09/12 01:43:52 tsutsui Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.145 2009/09/11 15:59:07 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.146 2009/09/12 01:43:52 tsutsui Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -362,8 +362,15 @@
* used for our initial mount
*/
ump = VFSTOUFS(mp);
- if (devvp != ump->um_devvp)
- error = EINVAL;
+ if (devvp != ump->um_devvp) {
+ if (devvp->v_rdev != ump->um_devvp->v_rdev)
+ error = EINVAL;
+ else {
+ vrele(devvp);
+ devvp = ump->um_devvp;
+ vref(devvp);
+ }
+ }
}
} else {
if (!update) {
Home |
Main Index |
Thread Index |
Old Index