Lines Matching refs:refcount
13 struct kref refcount;
28 kref_init(&data->refcount);
30 This sets the refcount in the kref to 1.
37 increment the refcount with kref_get() before passing it off:
38 kref_get(&data->refcount);
40 refcount cannot go to zero) you may do this without a lock.
43 kref_put(&data->refcount, data_release);
60 struct my_data *data = container_of(ref, struct my_data, refcount);
70 kref_put(&data->refcount, data_release);
81 kref_init(&data->refcount);
83 kref_get(&data->refcount);
94 kref_put(&data->refcount, data_release);
101 since we already have a valid pointer that we own a refcount for. The
114 kref_get(&data->refcount);
136 /* We are done with obj, so we pass our refcount off
150 struct kref refcount;
160 kref_get(&entry->refcount);
168 struct my_data *entry = container_of(ref, struct my_data, refcount);
177 kref_put(&entry->refcount, release_entry);
194 if (kref_put(&entry->refcount, release_entry)) {
226 if (!kref_get_unless_zero(&entry->refcount))
235 struct my_data *entry = container_of(ref, struct my_data, refcount);
245 kref_put(&entry->refcount, release_entry);
263 struct kref refcount;
274 if (!kref_get_unless_zero(&entry->refcount))
283 struct my_data *entry = container_of(ref, struct my_data, refcount);
293 kref_put(&entry->refcount, release_entry_rcu);