Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3419985yba; Tue, 16 Apr 2019 10:57:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtUOtRkQ/65/kp8QMnMe6sHN11KoSX32Ek8qqyIeR7lKfWQDNMMSCZJhu/Zk4YYIeCsB2i X-Received: by 2002:a62:6a81:: with SMTP id f123mr83541040pfc.40.1555437444796; Tue, 16 Apr 2019 10:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555437444; cv=none; d=google.com; s=arc-20160816; b=Vb9iBpED2Q8GEt11qBYiAgLC6r7sVwKfXaXeUNopCStGIOVJ959nni+zyyHPPWQlh3 1ioKFkYIeJfEADSVejTDKgRPGmiJw/nAfXCRSrl1UpPwgTE48To9sI04AiLPwSoYgBSq bkl/QUI3wFUssu3QpQhJ3wTvILg6KwMu5rcqKw4CjotqbKos4iZD0mqfWbnz4qCMj7yU CLekjGAANXyh19N0AZCo1d6NDsBVHYTzAqZyJ1HqoS1LWW6fSm/F+r7Lt3dp4zUexJTc LhMANdyxeXW04YObg3tCj3cV/wEBaAim8vi+JWUavIKUA1iIKgaNaLtJMhhf1he6TTqX Nqtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=m9ZRgAyfxe05xRWtUDQz50UQ0sduzguc3PFDfDX0gYg=; b=V3j00c82J+Wb7frwlN8y9WaKXjEhqPDqNUp9mAFSvpqiY6OxMoTSr+UjW911K/1YOs UeDUa4fVuAkYOFsW2fekFCEfxbbxNb/CB20HTnaTTlzetuYdDYUrEPS7CiT7zzRs2Ixp L3t+7N0ChCC2LBwJ6aCKym3q/n44hzhKSjxiPi026cvZTtghheGR9TeNxzqKW/ew3cse 8WjHdUtT/H1wiWZLpo2RdDmn5MON98x9hoLo5Zpur+AUqO5A/vwEH2gPJCbM+sQu0Uas gfHvpzVg0guWXVlFrxOgGjbjpA0KY3ZRHIo2zsc/pIS9qKrfT4c1+RALT2skarrEw/9+ y6uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24si42368049plo.220.2019.04.16.10.57.08; Tue, 16 Apr 2019 10:57:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730701AbfDPRzx (ORCPT + 99 others); Tue, 16 Apr 2019 13:55:53 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57682 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730338AbfDPRxt (ORCPT ); Tue, 16 Apr 2019 13:53:49 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hGSHD-0005ZT-KW; Tue, 16 Apr 2019 17:53:47 +0000 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH 50/62] afs: switch to use of ->free_inode() Date: Tue, 16 Apr 2019 18:53:28 +0100 Message-Id: <20190416175340.21068-50-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190416175340.21068-1-viro@ZenIV.linux.org.uk> References: <20190416174900.GT2217@ZenIV.linux.org.uk> <20190416175340.21068-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro debugging printks left in ->destroy_inode() and so's the update of inode count; we could take the latter to RCU-delayed part (would take only moving the check on module exit past rcu_barrier() there), but debugging output ought to either stay where it is or go into ->evict_inode() Signed-off-by: Al Viro --- fs/afs/super.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index 5adf012b8e27..bab89763119b 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -33,6 +33,7 @@ static void afs_i_init_once(void *foo); static void afs_kill_super(struct super_block *sb); static struct inode *afs_alloc_inode(struct super_block *sb); static void afs_destroy_inode(struct inode *inode); +static void afs_free_inode(struct inode *inode); static int afs_statfs(struct dentry *dentry, struct kstatfs *buf); static int afs_show_devname(struct seq_file *m, struct dentry *root); static int afs_show_options(struct seq_file *m, struct dentry *root); @@ -56,6 +57,7 @@ static const struct super_operations afs_super_ops = { .alloc_inode = afs_alloc_inode, .drop_inode = afs_drop_inode, .destroy_inode = afs_destroy_inode, + .free_inode = afs_free_inode, .evict_inode = afs_evict_inode, .show_devname = afs_show_devname, .show_options = afs_show_options, @@ -660,11 +662,9 @@ static struct inode *afs_alloc_inode(struct super_block *sb) return &vnode->vfs_inode; } -static void afs_i_callback(struct rcu_head *head) +static void afs_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); - struct afs_vnode *vnode = AFS_FS_I(inode); - kmem_cache_free(afs_inode_cachep, vnode); + kmem_cache_free(afs_inode_cachep, AFS_FS_I(inode)); } /* @@ -680,7 +680,6 @@ static void afs_destroy_inode(struct inode *inode) ASSERTCMP(vnode->cb_interest, ==, NULL); - call_rcu(&inode->i_rcu, afs_i_callback); atomic_dec(&afs_count_active_inodes); } -- 2.11.0