ceph: use kmem_cache_zalloc
[cascardo/linux.git] / fs / cachefiles / interface.c
index 675a333..861d611 100644 (file)
@@ -291,15 +291,8 @@ static void cachefiles_drop_object(struct fscache_object *_object)
        }
 
        /* note that the object is now inactive */
-       if (test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags)) {
-               write_lock(&cache->active_lock);
-               if (!test_and_clear_bit(CACHEFILES_OBJECT_ACTIVE,
-                                       &object->flags))
-                       BUG();
-               rb_erase(&object->active_node, &cache->active_nodes);
-               wake_up_bit(&object->flags, CACHEFILES_OBJECT_ACTIVE);
-               write_unlock(&cache->active_lock);
-       }
+       if (test_bit(CACHEFILES_OBJECT_ACTIVE, &object->flags))
+               cachefiles_mark_object_inactive(cache, object);
 
        dput(object->dentry);
        object->dentry = NULL;