KEYS: Define a __key_get() wrapper to use rather than atomic_inc()

Define a __key_get() wrapper to use rather than atomic_inc() on the key usage
count as this makes it easier to hook in refcount error debugging.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2013-09-24 10:35:16 +01:00
parent d0a059cac6
commit ccc3e6d9c9
5 changed files with 27 additions and 20 deletions

View File

@@ -644,7 +644,7 @@ found:
/* this races with key_put(), but that doesn't matter since key_put()
* doesn't actually change the key
*/
atomic_inc(&key->usage);
__key_get(key);
error:
spin_unlock(&key_serial_lock);