aboutsummaryrefslogtreecommitdiffstats
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 10:29:34 -0400
commit920bce20d74817bdd8bfcbc28ecb1179c9e01081 (patch)
tree5c11aa0cb02584c222b4e2b9e479effe95196026 /fs
parent9776de96e51565286da25c74d6f631abc50c63ef (diff)
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:
982submit_op_failed: 982submit_op_failed:
983 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags); 983 clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags);
984 spin_unlock(&cookie->lock); 984 spin_unlock(&cookie->lock);
985 fscache_unuse_cookie(object);
985 kfree(op); 986 kfree(op);
986 _leave(" [EIO]"); 987 _leave(" [EIO]");
987 return transit_to(KILL_OBJECT); 988 return transit_to(KILL_OBJECT);