Use the refcount_read accessor function, avoid reaching into refcount
and atomic struct fields.
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
mutex_lock(&mapping->mutex);
- if (mapping->refcount.refcount.refs.counter == 0)
+ if (refcount_read(&mapping->refcount.refcount) == 0)
gasket_nodev_error("Refcount is already 0!");
if (kref_put(&mapping->refcount, release_entry)) {
gasket_nodev_info("Removing Gasket sysfs mapping, device %s",