projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'jfs-4.2' of git://github.com/kleikamp/linux-shaggy
[firefly-linux-kernel-4.4.55.git]
/
fs
/
fscache
/
cookie.c
diff --git
a/fs/fscache/cookie.c
b/fs/fscache/cookie.c
index 89acec742e0bfdb2b1aab30e31991655462f05d9..d403c69bee0829fba9187114bc318dd810e8d179 100644
(file)
--- a/
fs/fscache/cookie.c
+++ b/
fs/fscache/cookie.c
@@
-327,7
+327,8
@@
static int fscache_alloc_object(struct fscache_cache *cache,
object_already_extant:
ret = -ENOBUFS;
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;
}
spin_unlock(&cookie->lock);
goto error;
}
@@
-671,7
+672,7
@@
int __fscache_check_consistency(struct fscache_cookie *cookie)
if (!op)
return -ENOMEM;
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);
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);
/* 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);
if (ret == 0) {
/* ask the cache to honour the operation */
ret = object->cache->ops->check_consistency(op);