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

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

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

Thread overview: 15+ 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-10 13:01 ` Kinglong Mee
     [not found] ` <5527C9A0.6030502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-13 11:33   ` David Howells
2015-04-13 11:33     ` David Howells
2015-04-13 12:23     ` Kinglong Mee
     [not found]     ` <552BB530.50405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-13 12:44       ` David Howells
2015-04-13 12:44         ` David Howells
     [not found]         ` <32264.1428929064-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
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             ` Kinglong Mee
2015-04-13 13:01         ` [PATCH v2 2/2] FSCACHE: Don't override netfs's primary_index if registering failed Kinglong Mee
     [not found]         ` <552BBE2E.5050903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-13 13:12           ` [PATCH v2 1/2] FSCACHE: Increase reference of parent after registering netfs success David Howells
2015-04-13 13:12             ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.