must invalidate any names for mounted on inode
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 24 Apr 1986 03:28:26 +0000 (19:28 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 24 Apr 1986 03:28:26 +0000 (19:28 -0800)
SCCS-vsn: sys/ufs/ffs/ffs_vfsops.c 6.14
SCCS-vsn: sys/ufs/ffs/ufs_vfsops.c 6.14
SCCS-vsn: sys/ufs/lfs/lfs_vfsops.c 6.14
SCCS-vsn: sys/ufs/ufs/ufs_vfsops.c 6.14

usr/src/sys/ufs/ffs/ffs_vfsops.c
usr/src/sys/ufs/ffs/ufs_vfsops.c
usr/src/sys/ufs/lfs/lfs_vfsops.c
usr/src/sys/ufs/ufs/ufs_vfsops.c

index 11c6ca5..a978e70 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ffs_vfsops.c        6.13 (Berkeley) %G%
+ *     @(#)ffs_vfsops.c        6.14 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -34,7 +34,7 @@ smount()
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
-       ndp->ni_nameiop = LOOKUP | NOCACHE | FOLLOW;
+       ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
@@ -139,6 +139,7 @@ found:
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
+               cacheinval(ip);
                iunlock(ip);
        }
        return (fs);
                iunlock(ip);
        }
        return (fs);
index c501de9..987665d 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ufs_vfsops.c        6.13 (Berkeley) %G%
+ *     @(#)ufs_vfsops.c        6.14 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -34,7 +34,7 @@ smount()
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
-       ndp->ni_nameiop = LOOKUP | NOCACHE | FOLLOW;
+       ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
@@ -139,6 +139,7 @@ found:
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
+               cacheinval(ip);
                iunlock(ip);
        }
        return (fs);
                iunlock(ip);
        }
        return (fs);
index 52002d1..5da28f6 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)lfs_vfsops.c        6.13 (Berkeley) %G%
+ *     @(#)lfs_vfsops.c        6.14 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -34,7 +34,7 @@ smount()
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
-       ndp->ni_nameiop = LOOKUP | NOCACHE | FOLLOW;
+       ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
@@ -139,6 +139,7 @@ found:
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
+               cacheinval(ip);
                iunlock(ip);
        }
        return (fs);
                iunlock(ip);
        }
        return (fs);
index c501de9..987665d 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)ufs_vfsops.c        6.13 (Berkeley) %G%
+ *     @(#)ufs_vfsops.c        6.14 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -34,7 +34,7 @@ smount()
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
        u.u_error = getmdev(&dev, uap->fspec);
        if (u.u_error)
                return;
-       ndp->ni_nameiop = LOOKUP | NOCACHE | FOLLOW;
+       ndp->ni_nameiop = LOOKUP | FOLLOW;
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
        ndp->ni_segflg = UIO_USERSPACE;
        ndp->ni_dirp = (caddr_t)uap->freg;
        ip = namei(ndp);
@@ -139,6 +139,7 @@ found:
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
        mp->m_dev = dev;
        if (ip) {
                ip->i_flag |= IMOUNT;
+               cacheinval(ip);
                iunlock(ip);
        }
        return (fs);
                iunlock(ip);
        }
        return (fs);