From: Milosz Tanski Date: Wed, 13 Aug 2014 16:58:21 +0000 (-0400) Subject: FS-Cache: Reduce cookie ref count if submit fails. X-Git-Tag: v3.17-rc7~33^2~3 X-Git-Url: http://git.cascardo.info/?a=commitdiff_plain;h=920bce20d74817bdd8bfcbc28ecb1179c9e01081;p=cascardo%2Flinux.git 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 Signed-off-by: David Howells --- 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);