Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3421640yba; Tue, 16 Apr 2019 10:59:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjdA71geP9W76zrx/8AtGuA+avzwCZRCmsFyE1gFD/sUK+Oz8dZgRF6eGaLNMXaj3VVYuo X-Received: by 2002:a65:6284:: with SMTP id f4mr78393252pgv.11.1555437564160; Tue, 16 Apr 2019 10:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555437564; cv=none; d=google.com; s=arc-20160816; b=cmrIGg5ThH8ouNDaGfYUtwpchbYPtOTj+GZ+UzF8drdGNrxd7XOvJiSsLJYB5aw8oX xW4vJ22dVB5fc93C955Clr7GLX6D0pd8fhcR3PvsrL26AevrLmfKnQzo9HwSD6UpPUyW 5USKt6/lQ2wxbXlf97CfHNtcpDpMlbsadvo5n3/jRrznEFOmwGE4/X1i72L+F6HGVql1 UCs8pa9jJBA+pZfZi5Tn/cn+iaMZKP4jd0dCmIPRZErQyWyqYE3FU1/E9+28sOUS0hHs rUxnf5x5YQor93WeoWZDTkvxz/Wo0szYunkBnP7MKIOfYPYKQXPta6e1H2t+bhkCy0O0 NKDg== 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=B7kEx3XuNKHfwtJeqZWs5fS5xgx40zuyhCaBAPMeei4=; b=JhWb6BGm/ZzTpuvGysquAMvAFW0j/8eRsqsx57XcGTVdV4hW/P0D4AgzFBQVJtaCXV FiCvghn3xG//Q4jFkBYUgSi2LmU1wIFx9dljOC8TdoYPzb40s2vuhbwEco+avGPSYHQm F65uHLwTsbLlOEFjWGU7DpXfmTtxESEYaY02HXKYQCZgA1aFcl1cluuI24XejuH5nC7+ A6ChmuvylEOu9lcrSCnTbzEqOLyaE/XAkEZlsXVN4LyAYHklMrM51XmaKWpO14KrOyGL lJbzpJt3Im5/SZ+qkt4dXnk7eHnHXNkhhkRMCkB8GvCSNJHdIfrl5fFkJ0vbwZiTMUEb 7z+A== 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 d4si35304815pgc.304.2019.04.16.10.59.07; Tue, 16 Apr 2019 10:59: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 S1730826AbfDPR6C (ORCPT + 99 others); Tue, 16 Apr 2019 13:58:02 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57590 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730268AbfDPRxq (ORCPT ); Tue, 16 Apr 2019 13:53:46 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hGSHA-0005X5-9Z; Tue, 16 Apr 2019 17:53:44 +0000 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH 27/62] nfs{,4}: switch to ->free_inode() Date: Tue, 16 Apr 2019 18:53:05 +0100 Message-Id: <20190416175340.21068-27-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 Signed-off-by: Al Viro --- fs/nfs/inode.c | 10 ++-------- fs/nfs/internal.h | 2 +- fs/nfs/nfs4super.c | 2 +- fs/nfs/super.c | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 414a90d48493..f61af8307dc8 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -2055,17 +2055,11 @@ struct inode *nfs_alloc_inode(struct super_block *sb) } EXPORT_SYMBOL_GPL(nfs_alloc_inode); -static void nfs_i_callback(struct rcu_head *head) +void nfs_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); } - -void nfs_destroy_inode(struct inode *inode) -{ - call_rcu(&inode->i_rcu, nfs_i_callback); -} -EXPORT_SYMBOL_GPL(nfs_destroy_inode); +EXPORT_SYMBOL_GPL(nfs_free_inode); static inline void nfs4_init_once(struct nfs_inode *nfsi) { diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index c7cf23ae6597..331a0504eaf8 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -381,7 +381,7 @@ int nfs_check_flags(int); /* inode.c */ extern struct workqueue_struct *nfsiod_workqueue; extern struct inode *nfs_alloc_inode(struct super_block *sb); -extern void nfs_destroy_inode(struct inode *); +extern void nfs_free_inode(struct inode *); extern int nfs_write_inode(struct inode *, struct writeback_control *); extern int nfs_drop_inode(struct inode *); extern void nfs_clear_inode(struct inode *); diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 6fb7cb6b3f4b..689977e148cb 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -50,7 +50,7 @@ struct file_system_type nfs4_referral_fs_type = { static const struct super_operations nfs4_sops = { .alloc_inode = nfs_alloc_inode, - .destroy_inode = nfs_destroy_inode, + .free_inode = nfs_free_inode, .write_inode = nfs4_write_inode, .drop_inode = nfs_drop_inode, .statfs = nfs_statfs, diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 23790c7b2289..aec4e2c4b02f 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -309,7 +309,7 @@ struct file_system_type nfs_xdev_fs_type = { const struct super_operations nfs_sops = { .alloc_inode = nfs_alloc_inode, - .destroy_inode = nfs_destroy_inode, + .free_inode = nfs_free_inode, .write_inode = nfs_write_inode, .drop_inode = nfs_drop_inode, .statfs = nfs_statfs, -- 2.11.0