]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/fscache/cookie.c
Merge tag 'mac80211-for-davem-2015-11-03' of git://git.kernel.org/pub/scm/linux/kerne...
[karo-tx-linux.git] / fs / fscache / cookie.c
index 89acec742e0bfdb2b1aab30e31991655462f05d9..d403c69bee0829fba9187114bc318dd810e8d179 100644 (file)
@@ -327,7 +327,8 @@ static int fscache_alloc_object(struct fscache_cache *cache,
 
 object_already_extant:
        ret = -ENOBUFS;
-       if (fscache_object_is_dead(object)) {
+       if (fscache_object_is_dying(object) ||
+           fscache_cache_is_broken(object)) {
                spin_unlock(&cookie->lock);
                goto error;
        }
@@ -671,7 +672,7 @@ int __fscache_check_consistency(struct fscache_cookie *cookie)
        if (!op)
                return -ENOMEM;
 
-       fscache_operation_init(op, NULL, NULL);
+       fscache_operation_init(op, NULL, NULL, NULL);
        op->flags = FSCACHE_OP_MYTHREAD |
                (1 << FSCACHE_OP_WAITING) |
                (1 << FSCACHE_OP_UNUSE_COOKIE);
@@ -695,8 +696,7 @@ int __fscache_check_consistency(struct fscache_cookie *cookie)
        /* the work queue now carries its own ref on the object */
        spin_unlock(&cookie->lock);
 
-       ret = fscache_wait_for_operation_activation(object, op,
-                                                   NULL, NULL, NULL);
+       ret = fscache_wait_for_operation_activation(object, op, NULL, NULL);
        if (ret == 0) {
                /* ask the cache to honour the operation */
                ret = object->cache->ops->check_consistency(op);