Peter Zijlstra 2c935bc572 locking/atomic, kref: Add kref_read()
Since we need to change the implementation, stop exposing internals.

Provide kref_read() to read the current reference count; typically
used for debug messages.

Kills two anti-patterns:

	atomic_read(&kref->refcount)
	kref->refcount.counter

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-01-14 11:37:18 +01:00
..
2017-01-14 11:37:18 +01:00
2016-06-21 22:10:55 +02:00
2016-09-19 15:04:15 +02:00
2016-11-09 13:55:13 +01:00
2012-11-28 18:36:05 +10:00
2016-11-15 23:33:48 +01:00
2016-06-21 22:10:55 +02:00
2016-09-19 15:04:15 +02:00
2016-09-19 15:04:15 +02:00
2013-12-18 11:35:45 +10:00
2016-05-06 16:04:48 +02:00
2015-08-12 12:24:05 -04:00
2016-12-08 13:42:57 +02:00
2014-03-17 20:11:57 +01:00