afs: Remove afs_xosi 50/13350/2
authorAndrew Deason <adeason@sinenomine.net>
Fri, 28 Sep 2018 22:12:40 +0000 (17:12 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 12 Oct 2018 13:40:39 +0000 (09:40 -0400)
commitd75bc6370f625479a67c7c0a50cce23c4d4a4ce5
tree6727ddcf58c623b920bb4004cf094ec2ca33190d
parent0548ee436d0f0f92a980d22e03149faedf38dc70
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 <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
22 files changed:
src/afs/AIX/osi_file.c
src/afs/AIX/osi_prototypes.h
src/afs/DARWIN/osi_file.c
src/afs/DARWIN/osi_prototypes.h
src/afs/DFBSD/osi_prototypes.h
src/afs/FBSD/osi_file.c
src/afs/FBSD/osi_prototypes.h
src/afs/HPUX/osi_file.c
src/afs/HPUX/osi_prototypes.h
src/afs/IRIX/osi_file.c
src/afs/IRIX/osi_prototypes.h
src/afs/IRIX/osi_vnodeops.c
src/afs/LINUX/osi_file.c
src/afs/LINUX/osi_module.c
src/afs/LINUX/osi_prototypes.h
src/afs/NBSD/osi_file.c
src/afs/NBSD/osi_prototypes.h
src/afs/OBSD/osi_file.c
src/afs/OBSD/osi_prototypes.h
src/afs/SOLARIS/osi_file.c
src/afs/SOLARIS/osi_prototypes.h
src/afs/afs_callback.c