STABLE14-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.


(cherry picked from commit a2d5bb078f3df6dc6fe992fdcaaf8b5a5607c0d6)
This commit is contained in:
Tom Keiser 2006-07-03 19:43:39 +00:00 committed by Jeffrey Altman
parent 7037c2210d
commit 30a18e7234
2 changed files with 11 additions and 8 deletions

View File

@ -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);
}
}

View File

@ -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.
<all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
<all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
KOBJ = MODLOAD
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
<sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
KOBJ = MODLOAD32 MODLOAD64
<sun4x_510>
KOBJ = MODLOAD64
# This tells Makefile.common to use it's single directory build target.
<all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
<all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
COMPDIRS = single_compdir
INSTDIRS = single_instdir
DESTDIRS = single_destdir