Lines Matching refs:refcount
28 struct kref refcount;
46 kref_init(&data->refcount);
48 This sets the refcount in the kref to 1.
58 increment the refcount with kref_get() before passing it off::
60 kref_get(&data->refcount);
63 refcount cannot go to zero) you may do this without a lock.
67 kref_put(&data->refcount, data_release);
85 struct my_data *data = container_of(ref, struct my_data, refcount);
95 kref_put(&data->refcount, data_release);
106 kref_init(&data->refcount);
108 kref_get(&data->refcount);
112 kref_put(&data->refcount, data_release);
120 kref_put(&data->refcount, data_release);
127 since we already have a valid pointer that we own a refcount for. The
140 kref_get(&data->refcount);
162 /* We are done with obj, so we pass our refcount off
176 struct kref refcount;
186 kref_get(&entry->refcount);
194 struct my_data *entry = container_of(ref, struct my_data, refcount);
203 kref_put(&entry->refcount, release_entry);
220 if (kref_put(&entry->refcount, release_entry)) {
242 if (!kref_get_unless_zero(&entry->refcount))
251 struct my_data *entry = container_of(ref, struct my_data, refcount);
261 kref_put(&entry->refcount, release_entry);
282 struct kref refcount;
293 if (!kref_get_unless_zero(&entry->refcount))
302 struct my_data *entry = container_of(ref, struct my_data, refcount);
312 kref_put(&entry->refcount, release_entry_rcu);