Module Name:    src
Committed By:   tsutsui
Date:           Mon Oct 19 17:53:36 UTC 2009

Modified Files:
        src/sys/fs/cd9660: cd9660_vfsops.c

Log Message:
Apply a similar fix for mount function from ffs_vfsops.c rev 1.186:
 Change cd9660_mount, in MNT_UPDATE case, to check dev_t's for equality
 instead of just vnode pointers.  Fixes erroneous "Invalid argument"
 errors from mount(8) with -u against cd9660 root in the presence of
 mfs or tmpfs /dev prepared after initial mountroot.

Tested on QEMU running cobalt Restore CD.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/fs/cd9660/cd9660_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/fs/cd9660/cd9660_vfsops.c
diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.67 src/sys/fs/cd9660/cd9660_vfsops.c:1.68
--- src/sys/fs/cd9660/cd9660_vfsops.c:1.67	Mon Jun 29 05:08:17 2009
+++ src/sys/fs/cd9660/cd9660_vfsops.c	Mon Oct 19 17:53:36 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd9660_vfsops.c,v 1.67 2009/06/29 05:08:17 dholland Exp $	*/
+/*	$NetBSD: cd9660_vfsops.c,v 1.68 2009/10/19 17:53:36 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1994
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.67 2009/06/29 05:08:17 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.68 2009/10/19 17:53:36 tsutsui Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
@@ -283,7 +283,8 @@
 		}
 	} else {
 		vrele(devvp);
-		if (devvp != imp->im_devvp)
+		if (devvp != imp->im_devvp &&
+		    devvp->v_rdev != imp->im_devvp->v_rdev)
 			return (EINVAL);	/* needs translation */
 	}
 	return set_statvfs_info(path, UIO_USERSPACE, args->fspec, UIO_USERSPACE,

Reply via email to