kref: Add a kref_sub function
Makes it possible to optimize batched multiple unrefs. Initial user will be drivers/gpu/ttm which accumulates unrefs to be processed outside of atomic code. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
d6ea88865d
commit
ecf7ace9a8
@@ -24,5 +24,7 @@ struct kref {
|
||||
void kref_init(struct kref *kref);
|
||||
void kref_get(struct kref *kref);
|
||||
int kref_put(struct kref *kref, void (*release) (struct kref *kref));
|
||||
int kref_sub(struct kref *kref, unsigned int count,
|
||||
void (*release) (struct kref *kref));
|
||||
|
||||
#endif /* _KREF_H_ */
|
||||
|
Reference in New Issue
Block a user