Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3418416yba; Tue, 16 Apr 2019 10:55:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo86l4aLX0S061ePhQzS9XuyCaVauN41W4Ksf0q6StHySwlRuG/W9CkMMimXVqViAZI9wM X-Received: by 2002:a63:8548:: with SMTP id u69mr79119123pgd.85.1555437324992; Tue, 16 Apr 2019 10:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555437324; cv=none; d=google.com; s=arc-20160816; b=hns35M4WVVFRJuMNtQ4UUUbu3qtpXAWWU744YPBPvVH+IQhsVV/5+Z+g2PJ4VjjAkc IRtPBCrMCb+uQFaDOAbNAkcub0WgjFLD/HZe1y6Ruw47/S1oXBdCz34HcLXPiPxi2+vu G0gKcO/pRLSr7h1yyeJcb0az91BStePIrLeky5hebV1tqyz4yFRiNKEth7hYp30jT1xW +gz+uCfZV2yR7+GHeW/iur1EDol7Edt1hreqMxmZ8lGyrw52soa/dVPznwT9CVYzImgf MSDNmzcb4BsLZd8/SsQxDW50/vYyFlhVxTc2q6JSVq7SdKTqHIZOHVPoqH8qlD6HPHa8 W/5w== 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=3HKA8HgeNGhc3ggLWizoz4ioE8+V9iH8ZZQmTYp3o6A=; b=vhRdQimKuZH6SbpC4JTqGCKqUP3H373yC2Nuu2bQa1QmdcG6PT1CwbfnzfTOtFuQjo M7AS5Il+GMqQQqtJADsLBD21jT7T0DEnGJW5bMLiB+IDlR4MhptCck9+bXPbK17ywpm6 OE21N8fZXVPpSJnal/mARlV//j/dnbGPJw9oyUwYy07ZfslWz/fVz+ahHC7oSGixyZ8j DuSfpTAbdUS6hW7Bck+nUltYsjiV7kVN7druTQrhONoFiXWni2WadFY74oSfX0ZhWH69 piqmOpH010bFiWXRtQSure5CKG4pm5ra4z2xv7xFk9LpZL1i4gWa8Lw8iWOmWIzFOaeT kzEQ== 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 2si26141441pld.334.2019.04.16.10.55.09; Tue, 16 Apr 2019 10:55: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 S1730530AbfDPRyI (ORCPT + 99 others); Tue, 16 Apr 2019 13:54:08 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57690 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730342AbfDPRxt (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-0005Zg-RN; 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 52/62] ceph: use ->free_inode() Date: Tue, 16 Apr 2019 18:53:30 +0100 Message-Id: <20190416175340.21068-52-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 a lot of non-delayed work in this case; all of that is left in ->destroy_inode() Signed-off-by: Al Viro --- fs/ceph/inode.c | 5 +---- fs/ceph/super.c | 1 + fs/ceph/super.h | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 2d61ddda9bf5..dc0a36d0adf8 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -519,9 +519,8 @@ struct inode *ceph_alloc_inode(struct super_block *sb) return &ci->vfs_inode; } -static void ceph_i_callback(struct rcu_head *head) +void ceph_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); struct ceph_inode_info *ci = ceph_inode(inode); kfree(ci->i_symlink); @@ -581,8 +580,6 @@ void ceph_destroy_inode(struct inode *inode) ceph_buffer_put(ci->i_xattrs.prealloc_blob); ceph_put_string(rcu_dereference_raw(ci->i_layout.pool_ns)); - - call_rcu(&inode->i_rcu, ceph_i_callback); } int ceph_drop_inode(struct inode *inode) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 6d5bb2f74612..285edda4fc3b 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -848,6 +848,7 @@ static void ceph_umount_begin(struct super_block *sb) static const struct super_operations ceph_super_ops = { .alloc_inode = ceph_alloc_inode, .destroy_inode = ceph_destroy_inode, + .free_inode = ceph_free_inode, .write_inode = ceph_write_inode, .drop_inode = ceph_drop_inode, .sync_fs = ceph_sync_fs, diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 16c03188578e..c5b4a05905c0 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -874,6 +874,7 @@ extern const struct inode_operations ceph_file_iops; extern struct inode *ceph_alloc_inode(struct super_block *sb); extern void ceph_destroy_inode(struct inode *inode); +extern void ceph_free_inode(struct inode *inode); extern int ceph_drop_inode(struct inode *inode); extern struct inode *ceph_get_inode(struct super_block *sb, -- 2.11.0