[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <53CE8862.7020201@adfin.com>
Date: Tue, 22 Jul 2014 11:50:58 -0400
From: Milosz Tanski <milosz@...in.com>
To: linux-cachefs@...hat.com
CC: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
"David Howells" <dhowells@...hat.com>, "NeilBrown" <neilb@...e.de>,
"Shantanu Goel" <sgoel01@...oo.com>
Subject: [PATCH 2/3] FS-Cache: Reduce cookie ref count if submit fails.
---
fs/fscache/object.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fscache/object.c b/fs/fscache/object.c
index d3b4539..186076b 100644
--- a/fs/fscache/object.c
+++ b/fs/fscache/object.c
@@ -925,6 +925,7 @@ static const struct fscache_state *_fscache_invalidate_object(struct fscache_obj
{
struct fscache_operation *op;
struct fscache_cookie *cookie = object->cookie;
+ bool wake_cookie = false;
_enter("{OBJ%x},%d", object->debug_id, event);
@@ -981,7 +982,10 @@ nomem:
submit_op_failed:
clear_bit(FSCACHE_OBJECT_IS_LIVE, &object->flags);
+ wake_cookie = __fscache_unuse_cookie(cookie);
spin_unlock(&cookie->lock);
+ if (wake_cookie)
+ __fscache_wake_unused_cookie(cookie);
kfree(op);
_leave(" [EIO]");
return transit_to(KILL_OBJECT);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists