Module Name: src
Committed By: snj
Date: Fri Oct 16 05:48:49 UTC 2009
Modified Files:
src/sys/ufs/ext2fs [netbsd-5]: ext2fs_vfsops.c
Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1060):
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.146
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.
To generate a diff of this commit:
cvs rdiff -u -r1.137.6.1 -r1.137.6.2 src/sys/ufs/ext2fs/ext2fs_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/ext2fs/ext2fs_vfsops.c
diff -u src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.1 src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.2
--- src/sys/ufs/ext2fs/ext2fs_vfsops.c:1.137.6.1 Sat Nov 29 23:10:19 2008
+++ src/sys/ufs/ext2fs/ext2fs_vfsops.c Fri Oct 16 05:48:48 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.1 2008/11/29 23:10:19 snj Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.137.6.1 2008/11/29 23:10:19 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_vfsops.c,v 1.137.6.2 2009/10/16 05:48:48 snj 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) {