Subject: kern/14742:
To: None <gnats-bugs@gnats.netbsd.org>
From: None <franklin@elfie.org>
List: netbsd-bugs
Date: 11/26/2001 16:27:01
>Number: 14742
>Category: kern
>Synopsis:
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 26 13:31:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: John Franklin
>Release: NetBSD 1.5Y
>Organization:
>Environment:
System: NetBSD taikoi 1.5Y NetBSD 1.5Y (TP600E) #60: Sat Nov 24 21:20:24 EST 2001 root@taikoi:/usr/src/sys/arch/i386-up/compile/TP600E i386
Architecture: i386
Machine: i386
>Description:
>How-To-Repeat:
inspect nfs_enterdircache in /sys/nfs/nfs_var.h and /sys/nfs/nfs_subs.c
>Fix:
One or the other needs to reverse the en and blkno fields.
nfs_subs.c has
struct nfsdircache *
nfs_enterdircache(vp, off, blkoff, en, blkno)
struct vnode *vp;
off_t off, blkoff;
daddr_t blkno;
int en;
nfs_var.h has
struct nfsdircache *nfs_enterdircache __P((struct vnode *, off_t, off_t, daddr_t, int));
Since the calling order in nfs_bio.c is (..., en, blkno), this patch
should do it:
Index: nfs_subs.c
===================================================================
RCS file: /cvsroot/syssrc/sys/nfs/nfs_subs.c,v
retrieving revision 1.99
diff -u -r1.99 nfs_subs.c
--- nfs_subs.c 2001/11/10 10:59:10 1.99
+++ nfs_subs.c 2001/11/26 21:24:11
@@ -1303,8 +1303,8 @@
nfs_enterdircache(vp, off, blkoff, en, blkno)
struct vnode *vp;
off_t off, blkoff;
- daddr_t blkno;
int en;
+ daddr_t blkno;
{
struct nfsnode *np = VTONFS(vp);
struct nfsdirhashhead *ndhp;
Index: nfs_var.h
===================================================================
RCS file: /cvsroot/syssrc/sys/nfs/nfs_var.h,v
retrieving revision 1.20
diff -u -r1.20 nfs_var.h
--- nfs_var.h 2001/09/15 16:13:02 1.20
+++ nfs_var.h 2001/11/26 21:24:12
@@ -239,7 +239,7 @@
u_long nfs_dirhash __P((off_t));
void nfs_initdircache __P((struct vnode *));
struct nfsdircache *nfs_searchdircache __P((struct vnode *, off_t, int, int *));
-struct nfsdircache *nfs_enterdircache __P((struct vnode *, off_t, off_t, daddr_t, int));
+struct nfsdircache *nfs_enterdircache __P((struct vnode *, off_t, off_t, int, daddr_t));
void nfs_invaldircache __P((struct vnode *, int));
void nfs_init __P((void));
int nfsm_loadattrcache __P((struct vnode **, struct mbuf **, caddr_t *,
>Release-Note:
>Audit-Trail:
>Unformatted:
nfs_enterdircache() prototype mismatch