linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fscache: put reference of parent's usage and n_children
@ 2015-04-10 13:01 Kinglong Mee
  2015-04-13 11:33 ` David Howells
  0 siblings, 1 reply; 10+ messages in thread
From: Kinglong Mee @ 2015-04-10 13:01 UTC (permalink / raw)
  To: David Howells; +Cc: linux-fsdevel, linux-nfs@vger.kernel.org, kinglongmee

If netfs exist, fscache must put the reference of parent's
usage and n_children, otherwise, never be decreased.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/fscache/netfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/fscache/netfs.c b/fs/fscache/netfs.c
index 6d941f5..b16afba 100644
--- a/fs/fscache/netfs.c
+++ b/fs/fscache/netfs.c
@@ -71,8 +71,7 @@ already_registered:
 	up_write(&fscache_addremove_sem);
 
 	if (ret < 0) {
-		netfs->primary_index->parent = NULL;
-		__fscache_cookie_put(netfs->primary_index);
+		fscache_relinquish_cookie(netfs->primary_index, 0);
 		netfs->primary_index = NULL;
 	}
 
-- 
2.3.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-14  9:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-10 13:01 [PATCH] fscache: put reference of parent's usage and n_children Kinglong Mee
2015-04-13 11:33 ` David Howells
2015-04-13 12:23   ` Kinglong Mee
2015-04-13 12:44   ` David Howells
2015-04-13 13:01     ` [PATCH v2 1/2] FSCACHE: Increase reference of parent after registering netfs success Kinglong Mee
2015-04-13 13:01     ` [PATCH v2 2/2] FSCACHE: Don't override netfs's primary_index if registering failed Kinglong Mee
2015-04-13 13:12     ` [PATCH v2 1/2] FSCACHE: Increase reference of parent after registering netfs success David Howells
2015-04-13 13:35       ` [PATCH v3 1/2] FSCACHE: Increase reference of parent after registering, " Kinglong Mee
2015-04-13 13:35       ` [PATCH v3 2/2] FSCACHE: Don't override netfs's primary_index if registering failed Kinglong Mee
2015-04-14  9:34       ` [PATCH v3 1/2] FSCACHE: Increase reference of parent after registering, netfs success David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).