From d4d4680f403dd0f857a6571a0d9a8adfa1fbdc2d Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Fri, 26 Sep 2003 17:57:45 +0000 Subject: [PATCH] openbsd-20030926 check for (v_type == VNON) from VFS_VGET in UFSOpen remove dead prototypes from osi_vnodeops.c --- src/afs/OBSD/osi_file.c | 2 ++ src/afs/OBSD/osi_vnodeops.c | 17 ----------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/afs/OBSD/osi_file.c b/src/afs/OBSD/osi_file.c index 5d312ec243..3ab4b3f815 100644 --- a/src/afs/OBSD/osi_file.c +++ b/src/afs/OBSD/osi_file.c @@ -38,6 +38,8 @@ osi_UFSOpen(afs_int32 ainode) osi_Panic("UFSOpen called for non-UFS cache\n"); afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file)); code = VFS_VGET(cacheDev.mp, (ino_t) ainode, &vp); + if (afile->vnode->v_type == VNON) + code = ENOENT; if (code) { osi_FreeSmallSpace(afile); osi_Panic("UFSOpen: igetinode failed"); diff --git a/src/afs/OBSD/osi_vnodeops.c b/src/afs/OBSD/osi_vnodeops.c index 7a753dfbc9..e4ee7a4eab 100644 --- a/src/afs/OBSD/osi_vnodeops.c +++ b/src/afs/OBSD/osi_vnodeops.c @@ -214,23 +214,6 @@ int afs_debug; #undef VREF #define VREF afs_nbsd_ref -#if 0 -extern int afs_lookup(); -extern int afs_open(); -extern int afs_close(); -extern int HandleIoctl(struct vcache *avc, afs_int32 acom, - struct afs_ioctl *adata); -extern int afs_fsync(); -extern int afs_remove(); -extern int afs_link(); -extern int afs_rename(); -extern int afs_mkdir(); -extern int afs_rmdir(); -extern int afs_symlink(); -extern int afs_readdir(); -extern int afs_readlink(); -#endif - int afs_nbsd_lookup(ap) struct vop_lookup_args /* {