Make GCPAGs_perproc_func cleaner for FBSD case
authorBen Kaduk <kaduk@mit.edu>
Wed, 31 Mar 2010 00:34:02 +0000 (20:34 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 31 Mar 2010 01:53:14 +0000 (18:53 -0700)
commit053522f534f73f9843a68334158ff98a48d9578e
tree744865e407e0f9d0f4992c7f2810d3183c0e91f7
parentc0f1970909d691d551273deee9b63bda50896ae6
Make GCPAGs_perproc_func cleaner for FBSD case

Partially rewrite 2cf1f10a to reduce code clutter.
Instead of accessing pproc->p_ucred directly in afs_GCPAGs_perproc_func(),
push this access into a FBSD-specific afs_proc2cred() function.
This is not quite right, since we do not lock the proc mutex, but
in the same way as the old version and with more reasonable preprocessor
conditionals.
This also eliminates a probably-needless call to osi_Panic.

Change-Id: Ib403132f31cc13f8c4581cb89ecc8938d0a0dd88
Reviewed-on: http://gerrit.openafs.org/1672
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_osi_gcpags.c
src/afs/afs_user.c