From: Andrew Deason Date: Fri, 28 Sep 2018 22:12:40 +0000 (-0500) Subject: afs: Remove afs_xosi X-Git-Tag: openafs-devel-1_9_0~409 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=d75bc6370f625479a67c7c0a50cce23c4d4a4ce5 afs: Remove afs_xosi Since OpenAFS 1.0, all platforms in libafs have a lock called afs_xosi, which is acquired and released around calls like VOP_GETATTR on cache files. However, this lock doesn't appear to protect anything; on all platforms, the code that runs while the lock is held uses only calls VOP_GETATTR and accesses local variables (aside from afs_osi_cred, which we use similarly in many other places). The purpose of the lock has never been documented, and is not mentioned at all in the afs_rwlocks text file. The comment by the afs_xosi lock declaration suggests that the lock was originally introduced to protect access to 'tvattr', which perhaps was a global variable in the past. All uses of 'tvattr' are local now, though, so protecting access to it doesn't make any sense. So, remove afs_xosi, to remove the unnecessary serialization of VOP_GETATTR calls. Change-Id: Ib3764600ae0155057361418c86b49a3507bdcd94 Reviewed-on: https://gerrit.openafs.org/13350 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk --- diff --git a/src/afs/AIX/osi_file.c b/src/afs/AIX/osi_file.c index 9ac164a..6df3b41 100644 --- a/src/afs/AIX/osi_file.c +++ b/src/afs/AIX/osi_file.c @@ -18,7 +18,6 @@ int afs_osicred_initialized = 0; afs_ucred_t afs_osi_cred; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct vfs *afs_cacheVfsp; @@ -65,7 +64,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); code = VNOP_GETATTR(afile->vnode, &tvattr, &afs_osi_cred); AFS_GLOCK(); @@ -74,7 +72,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -121,7 +118,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); /* * If we're truncating an unopened file to a non-zero length, * we need to bind it to a vm segment @@ -133,7 +129,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) AFS_GUNLOCK(); code = VNOP_FTRUNC(afile->vnode, mode, asize, (caddr_t) 0, &afs_osi_cred); AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/AIX/osi_prototypes.h b/src/afs/AIX/osi_prototypes.h index e6ebac3..84d31b3 100644 --- a/src/afs/AIX/osi_prototypes.h +++ b/src/afs/AIX/osi_prototypes.h @@ -10,9 +10,6 @@ #ifndef _OSI_PROTOTYPES_H_ #define _OSI_PROTOTYPES_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - /* osi_groups.c */ extern void afs_aix_SetupPagRefCount(void); diff --git a/src/afs/DARWIN/osi_file.c b/src/afs/DARWIN/osi_file.c index 56de715..5e54613 100644 --- a/src/afs/DARWIN/osi_file.c +++ b/src/afs/DARWIN/osi_file.c @@ -19,7 +19,6 @@ int afs_osicred_initialized = 0; afs_ucred_t afs_osi_cred; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct mount *afs_cacheVfsp; int afs_CacheFSType = -1; @@ -204,7 +203,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); #ifdef AFS_DARWIN80_ENV VATTR_INIT(&tvattr); @@ -224,7 +222,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -260,7 +257,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); AFS_GUNLOCK(); #ifdef AFS_DARWIN80_ENV VATTR_INIT(&tvattr); @@ -272,7 +268,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = VOP_SETATTR(afile->vnode, &tvattr, &afs_osi_cred, current_proc()); #endif AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/DARWIN/osi_prototypes.h b/src/afs/DARWIN/osi_prototypes.h index 0380461..c93cf5b 100644 --- a/src/afs/DARWIN/osi_prototypes.h +++ b/src/afs/DARWIN/osi_prototypes.h @@ -14,9 +14,6 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - /* osi_misc.c */ extern void darwin_notify_perms(struct unixuser *auser, int event); extern int osi_lookupname(char *aname, enum uio_seg seg, int followlink, diff --git a/src/afs/DFBSD/osi_prototypes.h b/src/afs/DFBSD/osi_prototypes.h index e65ae5b..1f0392e 100644 --- a/src/afs/DFBSD/osi_prototypes.h +++ b/src/afs/DFBSD/osi_prototypes.h @@ -14,9 +14,4 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - - - #endif /* _OSI_PROTO_H_ */ diff --git a/src/afs/FBSD/osi_file.c b/src/afs/FBSD/osi_file.c index 1cfc5c8..1e7702c 100644 --- a/src/afs/FBSD/osi_file.c +++ b/src/afs/FBSD/osi_file.c @@ -20,7 +20,6 @@ int afs_osicred_initialized = 0; #ifndef AFS_FBSD80_ENV /* cr_groups is now malloc()'d */ afs_ucred_t afs_osi_cred; #endif -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct mount *afs_cacheVfsp; @@ -64,7 +63,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); #if defined(AFS_FBSD80_ENV) vn_lock(afile->vnode, LK_EXCLUSIVE | LK_RETRY); @@ -81,7 +79,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -105,7 +102,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) afs_int32 code, glocked; AFS_STATCNT(osi_Truncate); - ObtainWriteLock(&afs_xosi, 321); vp = afile->vnode; /* * This routine only shrinks files, and most systems @@ -141,7 +137,6 @@ out: #endif if (glocked) AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/FBSD/osi_prototypes.h b/src/afs/FBSD/osi_prototypes.h index c3c3b60..1e0bed8 100644 --- a/src/afs/FBSD/osi_prototypes.h +++ b/src/afs/FBSD/osi_prototypes.h @@ -14,9 +14,6 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - /* osi_misc.c */ extern int osi_lookupname(char *aname, enum uio_seg seg, int followlink, struct vnode **vpp); diff --git a/src/afs/HPUX/osi_file.c b/src/afs/HPUX/osi_file.c index df9991e..bd52756 100644 --- a/src/afs/HPUX/osi_file.c +++ b/src/afs/HPUX/osi_file.c @@ -19,7 +19,6 @@ int afs_osicred_initialized = 0; afs_ucred_t afs_osi_cred; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct vfs *afs_cacheVfsp; @@ -66,7 +65,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); code = VOP_GETATTR(afile->vnode, &tvattr, &afs_osi_cred, VSYNC); AFS_GLOCK(); @@ -75,7 +73,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -107,7 +104,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); VATTR_NULL(&tvattr); /* note that this credential swapping stuff is only necessary because * of ufs's references directly to u.u_cred instead of to @@ -119,7 +115,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = VOP_SETATTR(afile->vnode, &tvattr, &afs_osi_cred, 0); AFS_GLOCK(); set_p_cred(u.u_procp, oldCred); /* restore */ - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/HPUX/osi_prototypes.h b/src/afs/HPUX/osi_prototypes.h index 4bc45e9..6867e15 100644 --- a/src/afs/HPUX/osi_prototypes.h +++ b/src/afs/HPUX/osi_prototypes.h @@ -6,7 +6,4 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - #endif /* _OSI_PROTO_H_ */ diff --git a/src/afs/IRIX/osi_file.c b/src/afs/IRIX/osi_file.c index 9f99c00..b9e886b 100644 --- a/src/afs/IRIX/osi_file.c +++ b/src/afs/IRIX/osi_file.c @@ -17,7 +17,6 @@ afs_ucred_t afs_osi_cred; int afs_osicred_initialized = 0; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct vfs *afs_cacheVfsp; @@ -71,7 +70,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); tvattr.va_mask = AT_SIZE | AT_BLKSIZE | AT_MTIME | AT_ATIME; AFS_VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred, code); @@ -81,7 +79,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -114,13 +111,11 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); AFS_GUNLOCK(); tvattr.va_mask = AT_SIZE; tvattr.va_size = asize; AFS_VOP_SETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred, code); AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/IRIX/osi_prototypes.h b/src/afs/IRIX/osi_prototypes.h index 53eed50..c7a8796 100644 --- a/src/afs/IRIX/osi_prototypes.h +++ b/src/afs/IRIX/osi_prototypes.h @@ -10,7 +10,4 @@ #ifndef _OSI_PROTOTYPES_H_ #define _OSI_PROTOTYPES_H_ -/* osi_file.c */ -extern afs_lock_t afs_xosi; - #endif /* _OSI_PROTOTYPES_H_ */ diff --git a/src/afs/IRIX/osi_vnodeops.c b/src/afs/IRIX/osi_vnodeops.c index 5efd81c..29aab4a 100644 --- a/src/afs/IRIX/osi_vnodeops.c +++ b/src/afs/IRIX/osi_vnodeops.c @@ -1902,15 +1902,12 @@ struct vnodeops *afs_ops = &Afs_vnodeops; /* Initialized in osi_InitCacheFSType(). Used to determine inode type. */ vnodeops_t *afs_xfs_vnodeopsp; -extern afs_lock_t afs_xosi; /* lock is for tvattr */ - ino_t VnodeToIno(vnode_t * vp) { int code; struct vattr vattr; - ObtainWriteLock(&afs_xosi, 579); vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */ AFS_GUNLOCK(); AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code); @@ -1918,7 +1915,6 @@ VnodeToIno(vnode_t * vp) if (code) { osi_Panic("VnodeToIno"); } - ReleaseWriteLock(&afs_xosi); return vattr.va_nodeid; } @@ -1928,7 +1924,6 @@ VnodeToDev(vnode_t * vp) int code; struct vattr vattr; - ObtainWriteLock(&afs_xosi, 580); vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */ AFS_GUNLOCK(); AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code); @@ -1936,7 +1931,6 @@ VnodeToDev(vnode_t * vp) if (code) { osi_Panic("VnodeToDev"); } - ReleaseWriteLock(&afs_xosi); return (dev_t) vattr.va_fsid; } @@ -1946,7 +1940,6 @@ VnodeToSize(vnode_t * vp) int code; struct vattr vattr; - ObtainWriteLock(&afs_xosi, 581); vattr.va_mask = AT_SIZE; AFS_GUNLOCK(); AFS_VOP_GETATTR(vp, &vattr, 0, OSI_GET_CURRENT_CRED(), code); @@ -1954,7 +1947,6 @@ VnodeToSize(vnode_t * vp) if (code) { osi_Panic("VnodeToSize"); } - ReleaseWriteLock(&afs_xosi); return vattr.va_size; } #endif /* AFS_SGI62_ENV */ diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 21bfd84..8f12246 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -33,7 +33,6 @@ int cache_fh_type = -1; int cache_fh_len = -1; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct vfsmount *afs_cacheMnt; extern struct super_block *afs_cacheSBp; @@ -154,12 +153,10 @@ int afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) { AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); astat->size = i_size_read(OSIFILE_INODE(afile)); astat->mtime = OSIFILE_INODE(afile)->i_mtime.tv_sec; astat->atime = OSIFILE_INODE(afile)->i_atime.tv_sec; - ReleaseWriteLock(&afs_xosi); return 0; } @@ -192,7 +189,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); AFS_GUNLOCK(); afs_linux_lock_inode(inode); #ifdef STRUCT_INODE_HAS_I_ALLOC_SEM @@ -218,7 +214,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) #endif afs_linux_unlock_inode(inode); AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c index d6172c1..2b48453 100644 --- a/src/afs/LINUX/osi_module.c +++ b/src/afs/LINUX/osi_module.c @@ -50,7 +50,6 @@ int __init afs_init(void) { int err; - AFS_RWLOCK_INIT(&afs_xosi, "afs_xosi"); #ifdef HAVE_LINUX_KUID_T afs_ns = afs_current_user_ns(); diff --git a/src/afs/LINUX/osi_prototypes.h b/src/afs/LINUX/osi_prototypes.h index 5002af1..438b077 100644 --- a/src/afs/LINUX/osi_prototypes.h +++ b/src/afs/LINUX/osi_prototypes.h @@ -35,7 +35,6 @@ extern void osi_linux_nfssrv_shutdown(void); extern afs_rwlock_t afs_xnfssrv; /* osi_file.c */ -extern afs_rwlock_t afs_xosi; extern int osi_InitCacheInfo(char *aname); extern int osi_rdwr(struct osi_file *osifile, struct uio *uiop, int rw); extern struct file *afs_linux_raw_open(afs_dcache_id_t *ainode); diff --git a/src/afs/NBSD/osi_file.c b/src/afs/NBSD/osi_file.c index dfacb69..efebc39 100644 --- a/src/afs/NBSD/osi_file.c +++ b/src/afs/NBSD/osi_file.c @@ -16,7 +16,6 @@ int afs_osicred_initialized; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct mount *afs_cacheVfsp; @@ -60,7 +59,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); #ifdef AFS_NBSD50_ENV code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp); @@ -74,7 +72,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -108,7 +105,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); VATTR_NULL(&tvattr); tvattr.va_size = asize; AFS_GUNLOCK(); @@ -127,7 +123,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) AFS_GLOCK(); if (code == 0) afile->size = asize; - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/NBSD/osi_prototypes.h b/src/afs/NBSD/osi_prototypes.h index 4bc45e9..6867e15 100644 --- a/src/afs/NBSD/osi_prototypes.h +++ b/src/afs/NBSD/osi_prototypes.h @@ -6,7 +6,4 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - #endif /* _OSI_PROTO_H_ */ diff --git a/src/afs/OBSD/osi_file.c b/src/afs/OBSD/osi_file.c index 7929141..6c5ddd9 100644 --- a/src/afs/OBSD/osi_file.c +++ b/src/afs/OBSD/osi_file.c @@ -18,7 +18,6 @@ int afs_osicred_initialized; afs_ucred_t afs_osi_cred; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct mount *afs_cacheVfsp; @@ -63,7 +62,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); AFS_GUNLOCK(); code = VOP_GETATTR(afile->vnode, &tvattr, afs_osi_credp, curproc); AFS_GLOCK(); @@ -72,7 +70,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -106,7 +103,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); VATTR_NULL(&tvattr); tvattr.va_size = asize; AFS_GUNLOCK(); @@ -116,7 +112,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) AFS_GLOCK(); if (code == 0) afile->size = asize; - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/OBSD/osi_prototypes.h b/src/afs/OBSD/osi_prototypes.h index 4bc45e9..6867e15 100644 --- a/src/afs/OBSD/osi_prototypes.h +++ b/src/afs/OBSD/osi_prototypes.h @@ -6,7 +6,4 @@ #ifndef _OSI_PROTO_H_ #define _OSI_PROTO_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - #endif /* _OSI_PROTO_H_ */ diff --git a/src/afs/SOLARIS/osi_file.c b/src/afs/SOLARIS/osi_file.c index a3387ec..1f81f4a 100644 --- a/src/afs/SOLARIS/osi_file.c +++ b/src/afs/SOLARIS/osi_file.c @@ -18,7 +18,6 @@ int afs_osicred_initialized = 0; -afs_lock_t afs_xosi; /* lock is for tvattr */ extern struct osi_dev cacheDev; extern struct vfs *afs_cacheVfsp; @@ -116,11 +115,6 @@ VnodeToSize(vnode_t * vp) int code; struct vattr vattr; - /* - * We lock xosi in osi_Stat, so we probably should - * lock it here too - RWH. - */ - ObtainWriteLock(&afs_xosi, 578); vattr.va_mask = AT_SIZE; AFS_GUNLOCK(); #ifdef AFS_SUN511_ENV @@ -132,7 +126,6 @@ VnodeToSize(vnode_t * vp) if (code) { osi_Panic("VnodeToSize"); } - ReleaseWriteLock(&afs_xosi); return (afs_int32) (vattr.va_size); } @@ -258,7 +251,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) afs_int32 code; struct vattr tvattr; AFS_STATCNT(osi_Stat); - ObtainWriteLock(&afs_xosi, 320); /* Ufs doesn't seem to care about the flags so we pass 0 for now */ tvattr.va_mask = AT_ALL; AFS_GUNLOCK(); @@ -273,7 +265,6 @@ afs_osi_Stat(struct osi_file *afile, struct osi_stat *astat) astat->mtime = tvattr.va_mtime.tv_sec; astat->atime = tvattr.va_atime.tv_sec; } - ReleaseWriteLock(&afs_xosi); return code; } @@ -305,7 +296,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = afs_osi_Stat(afile, &tstat); if (code || tstat.size <= asize) return code; - ObtainWriteLock(&afs_xosi, 321); tvattr.va_mask = AT_SIZE; tvattr.va_size = asize; /* @@ -318,7 +308,6 @@ osi_UFSTruncate(struct osi_file *afile, afs_int32 asize) code = VOP_SETATTR(afile->vnode, &tvattr, 0, afs_osi_credp); #endif AFS_GLOCK(); - ReleaseWriteLock(&afs_xosi); return code; } diff --git a/src/afs/SOLARIS/osi_prototypes.h b/src/afs/SOLARIS/osi_prototypes.h index 237a868..49ba3d2 100644 --- a/src/afs/SOLARIS/osi_prototypes.h +++ b/src/afs/SOLARIS/osi_prototypes.h @@ -10,9 +10,6 @@ #ifndef _OSI_PROTOTYPES_H_ #define _OSI_PROTOTYPES_H_ -/* osi_file.c */ -extern afs_rwlock_t afs_xosi; - /* osi_vnodeops.c */ int afs_putapage(struct vnode *vp, struct page *pages, u_offset_t * offp, size_t * lenp, int flags, afs_ucred_t *credp); diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c index 038cdda..f8b7c6a 100644 --- a/src/afs/afs_callback.c +++ b/src/afs/afs_callback.c @@ -52,10 +52,6 @@ static struct ltable { "afs_xcbhash", (char *)&afs_xcbhash}, { "afs_xaxs", (char *)&afs_xaxs}, { "afs_xinterface", (char *)&afs_xinterface}, -#ifndef UKERNEL - { - "afs_xosi", (char *)&afs_xosi}, -#endif { "afs_xsrvAddr", (char *)&afs_xsrvAddr}, {