Add support for kref_read() function in the LinuxKPI.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
This commit is contained in:
hselasky 2018-02-17 20:56:35 +00:00
parent 2e7a47da99
commit f83f8b720f

View File

@ -52,6 +52,13 @@ kref_init(struct kref *kref)
refcount_init(&kref->refcount.counter, 1);
}
static inline unsigned int
kref_read(const struct kref *kref)
{
return (atomic_read(&kref->refcount));
}
static inline void
kref_get(struct kref *kref)
{