Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/cd9660 Apply a similar fix for mount function from ff...



details:   https://anonhg.NetBSD.org/src/rev/6b0715b57a02
branches:  trunk
changeset: 748289:6b0715b57a02
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Mon Oct 19 17:53:36 2009 +0000

description:
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.

diffstat:

 sys/fs/cd9660/cd9660_vfsops.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r cc7794b47d3b -r 6b0715b57a02 sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c     Mon Oct 19 17:52:01 2009 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c     Mon Oct 19 17:53:36 2009 +0000
@@ -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,



Home | Main Index | Thread Index | Old Index