summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMilosz Tanski <milosz@adfin.com>2014-08-13 12:58:21 -0400
committerDavid Howells <dhowells@redhat.com>2014-08-27 15:29:34 +0100
commit920bce20d74817bdd8bfcbc28ecb1179c9e01081 (patch)
tree5c11aa0cb02584c222b4e2b9e479effe95196026 /fs
parent9776de96e51565286da25c74d6f631abc50c63ef (diff)
downloadlinux-stable-920bce20d74817bdd8bfcbc28ecb1179c9e01081.tar.gz
linux-stable-920bce20d74817bdd8bfcbc28ecb1179c9e01081.tar.bz2
linux-stable-920bce20d74817bdd8bfcbc28ecb1179c9e01081.zip
FS-Cache: Reduce cookie ref count if submit fails.
I've been seeing issues with disposing cookies under vma pressure. The symptom is that the refcount gets out of sync. In this case we fail to decrement the refcount if submit fails. I found this while auditing the error in and around cookie operations. Signed-off-by: Milosz Tanski <milosz@adfin.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/fscache/object.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/fscache/object.c b/fs/fscache/object.c
index d3b4539f1651..da032daf0e0d 100644
--- a/fs/fscache/object.c
+++ b/fs/fscache/object.c
@@ -982,6 +982,7 @@ nomem:
submit_op_failed:
clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags);
spin_unlock(&cookie->lock);
+ fscache_unuse_cookie(object);
kfree(op);
_leave(" [EIO]");
return transit_to(KILL_OBJECT);