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
144 kref_get(&data->refcount);
166 /* We are done with obj, so we pass our refcount off
180 struct kref refcount;
190 kref_get(&entry->refcount);
198 struct my_data *entry = container_of(ref, struct my_data, refcount);
207 kref_put(&entry->refcount, release_entry);
224 if (kref_put(&entry->refcount, release_entry)) {
246 if (!kref_get_unless_zero(&entry->refcount))
255 struct my_data *entry = container_of(ref, struct my_data, refcount);
265 kref_put(&entry->refcount, release_entry);
286 struct kref refcount;
297 if (!kref_get_unless_zero(&entry->refcount))
306 struct my_data *entry = container_of(ref, struct my_data, refcount);
316 kref_put(&entry->refcount, release_entry_rcu);