|
@@ -66,8 +66,6 @@ static inline void kref_get(struct kref *kref)
|
|
|
*/
|
|
|
static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref))
|
|
|
{
|
|
|
- WARN_ON(release == NULL);
|
|
|
-
|
|
|
if (refcount_dec_and_test(&kref->refcount)) {
|
|
|
release(kref);
|
|
|
return 1;
|
|
@@ -79,8 +77,6 @@ static inline int kref_put_mutex(struct kref *kref,
|
|
|
void (*release)(struct kref *kref),
|
|
|
struct mutex *lock)
|
|
|
{
|
|
|
- WARN_ON(release == NULL);
|
|
|
-
|
|
|
if (refcount_dec_and_mutex_lock(&kref->refcount, lock)) {
|
|
|
release(kref);
|
|
|
return 1;
|
|
@@ -92,8 +88,6 @@ static inline int kref_put_lock(struct kref *kref,
|
|
|
void (*release)(struct kref *kref),
|
|
|
spinlock_t *lock)
|
|
|
{
|
|
|
- WARN_ON(release == NULL);
|
|
|
-
|
|
|
if (refcount_dec_and_lock(&kref->refcount, lock)) {
|
|
|
release(kref);
|
|
|
return 1;
|