Linux: Use atomics for credential reference counts
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sat, 24 Oct 2009 14:08:52 +0000 (15:08 +0100)
committerDerrick Brashear <shadow|account-1000005@unknown>
Fri, 20 Nov 2009 12:39:23 +0000 (04:39 -0800)
commit4f91de7cf429db63bcf67466cf3fb36feb990643
tree2de9f236fa43fe26e1972c616ff0142c11896e6c
parentb9f6a8ce1898cd90c713dc4b54a27bd1644fe47a
Linux: Use atomics for credential reference counts

The reference count maintained as part of the afs_cred structure
wasn't being maintained atomically, requiring that crfree and
crhold always be called with the GLOCK held.

This patch just switches to using Linux's inbuilt atomic types to
maintain the reference count.

Change-Id: I1787061afbb48e234b4839b38b8801168ea2f25f
Reviewed-on: http://gerrit.openafs.org/726
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_cred.c
src/afs/LINUX/osi_machdep.h
src/afs/afs_osi_gcpags.c