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:
parent
2e7a47da99
commit
f83f8b720f
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user