From: Tom Keiser Date: Mon, 3 Jul 2006 19:41:31 +0000 (+0000) Subject: sol10u2-rename-20060703 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1217 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=a2d5bb078f3df6dc6fe992fdcaaf8b5a5607c0d6 sol10u2-rename-20060703 FIXES 34774 In s10u2 the vnode path cache code was modified so that we're no longer guaranteed of having a valid path cache pointer for the lofs mount case. Attached patch changes gafs_rename to deal with this. Patch also removes unnecessary MODLOAD32 build rule from sun4x_510 case. --- diff --git a/src/afs/SOLARIS/osi_vnodeops.c b/src/afs/SOLARIS/osi_vnodeops.c index fae5817..d55387d 100644 --- a/src/afs/SOLARIS/osi_vnodeops.c +++ b/src/afs/SOLARIS/osi_vnodeops.c @@ -1698,11 +1698,13 @@ gafs_rename(aodp, aname1, andp, aname2, acred) struct vnode *vp = AFSTOV(avcp), *pvp = AFSTOV(andp); mutex_enter(&vp->v_lock); - kmem_free(vp->v_path, strlen(vp->v_path) + 1); - vp->v_path = NULL; + if (vp->v_path != NULL) { + kmem_free(vp->v_path, strlen(vp->v_path) + 1); + vp->v_path = NULL; + } mutex_exit(&vp->v_lock); - VN_SETPATH(afs_globalVp, pvp, vp, aname2, strlen(aname2)); - + vn_setpath(afs_globalVp, pvp, vp, aname2, strlen(aname2)); + AFS_RELE(avcp); } } diff --git a/src/libafs/MakefileProto.SOLARIS.in b/src/libafs/MakefileProto.SOLARIS.in index a5295d7..f715b9e 100644 --- a/src/libafs/MakefileProto.SOLARIS.in +++ b/src/libafs/MakefileProto.SOLARIS.in @@ -44,14 +44,15 @@ KDEFS_64 = -xarch=amd64 -xmodel=kernel CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} # Name of directory to hold object files and libraries. - + KOBJ = MODLOAD - + KOBJ = MODLOAD32 MODLOAD64 - + +KOBJ = MODLOAD64 # This tells Makefile.common to use it's single directory build target. - + COMPDIRS = single_compdir INSTDIRS = single_instdir DESTDIRS = single_destdir