From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kinglong Mee Subject: [PATCH] fscache: put reference of parent's usage and n_children Date: Fri, 10 Apr 2015 21:01:20 +0800 Message-ID: <5527C9A0.6030502@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , kinglongmee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org To: David Howells Return-path: Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org If netfs exist, fscache must put the reference of parent's usage and n_children, otherwise, never be decreased. Signed-off-by: Kinglong Mee --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com ([209.85.192.182]:34710 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932497AbbDJNBa (ORCPT ); Fri, 10 Apr 2015 09:01:30 -0400 Message-ID: <5527C9A0.6030502@gmail.com> Date: Fri, 10 Apr 2015 21:01:20 +0800 From: Kinglong Mee MIME-Version: 1.0 To: David Howells CC: linux-fsdevel@vger.kernel.org, "linux-nfs@vger.kernel.org" , kinglongmee@gmail.com Subject: [PATCH] fscache: put reference of parent's usage and n_children Content-Type: text/plain; charset=utf-8 Sender: linux-nfs-owner@vger.kernel.org List-ID: If netfs exist, fscache must put the reference of parent's usage and n_children, otherwise, never be decreased. Signed-off-by: Kinglong Mee --- 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