Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs fix spec vnode aliasing.



details:   https://anonhg.NetBSD.org/src/rev/e9d727bd3089
branches:  trunk
changeset: 555024:e9d727bd3089
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Nov 07 14:52:27 2003 +0000

description:
fix spec vnode aliasing.

diffstat:

 sys/ufs/lfs/lfs_extern.h   |   4 ++--
 sys/ufs/lfs/lfs_syscalls.c |   6 +++---
 sys/ufs/lfs/lfs_vfsops.c   |  11 +++++++----
 3 files changed, 12 insertions(+), 9 deletions(-)

diffs (90 lines):

diff -r 5a1c9de0f008 -r e9d727bd3089 sys/ufs/lfs/lfs_extern.h
--- a/sys/ufs/lfs/lfs_extern.h  Fri Nov 07 14:50:21 2003 +0000
+++ b/sys/ufs/lfs/lfs_extern.h  Fri Nov 07 14:52:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_extern.h,v 1.55 2003/09/29 15:12:08 yamt Exp $     */
+/*     $NetBSD: lfs_extern.h,v 1.56 2003/11/07 14:52:27 yamt Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -212,7 +212,7 @@
 int lfs_fhtovp(struct mount *, struct fid *, struct vnode **);
 int lfs_vptofh(struct vnode *, struct fid *);
 int lfs_sysctl(int *, u_int, void *, size_t *, void *, size_t, struct proc *);
-void lfs_vinit(struct mount *mp, struct vnode *);
+void lfs_vinit(struct mount *mp, struct vnode **);
 
 /* lfs_vnops.c */
 void lfs_mark_vnode(struct vnode *);
diff -r 5a1c9de0f008 -r e9d727bd3089 sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c        Fri Nov 07 14:50:21 2003 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c        Fri Nov 07 14:52:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_syscalls.c,v 1.98 2003/09/10 11:09:11 yamt Exp $   */
+/*     $NetBSD: lfs_syscalls.c,v 1.99 2003/11/07 14:52:27 yamt Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.98 2003/09/10 11:09:11 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.99 2003/11/07 14:52:27 yamt Exp $");
 
 #ifndef LFS
 # define LFS           /* for prototypes in syscallargs.h */
@@ -1158,7 +1158,7 @@
                *ip->i_din.ffs1_din = *dip;
                brelse(bp);
        }
-       lfs_vinit(mp, vp);
+       lfs_vinit(mp, &vp);
 
        *vpp = vp;
 
diff -r 5a1c9de0f008 -r e9d727bd3089 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Fri Nov 07 14:50:21 2003 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Fri Nov 07 14:52:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.138 2003/11/07 14:50:18 yamt Exp $    */
+/*     $NetBSD: lfs_vfsops.c,v 1.139 2003/11/07 14:52:28 yamt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.138 2003/11/07 14:50:18 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.139 2003/11/07 14:52:28 yamt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -1669,7 +1669,7 @@
                ip->i_ffs1_atimensec = ts.tv_nsec;
        }
 
-       lfs_vinit(mp, vp);
+       lfs_vinit(mp, &vp);
 
        *vpp = vp;
 
@@ -2054,8 +2054,9 @@
  * used by lfs_vget and lfs_fastvget.
  */
 void
-lfs_vinit(struct mount *mp, struct vnode *vp)
+lfs_vinit(struct mount *mp, struct vnode **vpp)
 {
+       struct vnode *vp = *vpp;
        struct inode *ip = VTOI(vp);
        struct ufsmount *ump = VFSTOUFS(mp);
        int i;
@@ -2119,4 +2120,6 @@
        VREF(ip->i_devvp);
        genfs_node_init(vp, &lfs_genfsops);
        uvm_vnp_setsize(vp, ip->i_size);
+
+       *vpp = vp;
 }



Home | Main Index | Thread Index | Old Index