Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3419589yba; Tue, 16 Apr 2019 10:56:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbQoTtyNIMV0aa1eS164TlIVayv59InY6UQ6ZroTObbHAsBj5udIgIU0ewU00ii1YroHP9 X-Received: by 2002:a62:26c1:: with SMTP id m184mr47068432pfm.102.1555437414297; Tue, 16 Apr 2019 10:56:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555437414; cv=none; d=google.com; s=arc-20160816; b=uNqzIG7UOHZJCb0oEKh/Yv42tEViMTjqNip+ZiBMOkaulsDUS7TZaYQINX+2Uz7vXM Z41gVEYt4GXRPh9us7hA3LmX/rNTwqviSqLTeBTbTo04xVEMphQBDLnoqhES2YLYJA/K QYCLvhzAMEvqzHHsmCv1fGZ9lnOuHSsSt/HKXnhVwgsAxRv42+DQr6e0TF0mqiLZrPyM ciaf804OTGGOun0tfTXEdLvw12XTMxiVrBcnDmnH+SgkoO9ntbsWami8LO5vjObCAbDY GCcsp4v+puqSWta0M9EucabO0QmBk1+otgulTTI7/xuLbAL8xNeTkhOzqdINU63cnxah 6eig== 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=RiBUolEKHftlPkToAeQ0o8CGdDDzwRzLpsatWAhJzPg=; b=NpYH5sG7khxmb8vCIs7XafsYj0ghXUhXg+KOi2kYXmgVEiG4mmvIetI73B/5te5RBg 8VI/JBxpiAk52SRFmqoxit7Z6fXqBihNE4ooOYxEse0DbVdAwC1cLc4M5pAWZjjwCZ30 82tHBqxhR3SjNDFT6uLEn3NHpKd2vRJLlPykJLCtO9kj7fLqJiHQHmrLpQHAwpgBFbNH tDtPS402J1ReFLLreWrKLu9k6jBG2YUgQB6C3jOnRHa8rdYVa0VMgqRmlJTaBn0U2OSd 9Fb76uJRpyrGNBbWkl2fjgMtrOELt8W16GBLYaOiUFPF3cBMCxzttuvFPCr66O4xHt0C u/7Q== 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 j19si45847002pfh.147.2019.04.16.10.56.38; Tue, 16 Apr 2019 10:56:54 -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 S1730653AbfDPRza (ORCPT + 99 others); Tue, 16 Apr 2019 13:55:30 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:57710 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730364AbfDPRxu (ORCPT ); Tue, 16 Apr 2019 13:53:50 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hGSHE-0005aB-KI; Tue, 16 Apr 2019 17:53:48 +0000 From: Al Viro To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [RFC PATCH 57/62] overlayfs: make use of ->free_inode() Date: Tue, 16 Apr 2019 18:53:35 +0100 Message-Id: <20190416175340.21068-57-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 synchronous parts are left in ->destroy_inode() Signed-off-by: Al Viro --- fs/overlayfs/super.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 0116735cc321..5ec4fc2f5d7e 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -190,11 +190,13 @@ static struct inode *ovl_alloc_inode(struct super_block *sb) return &oi->vfs_inode; } -static void ovl_i_callback(struct rcu_head *head) +static void ovl_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); + struct ovl_inode *oi = OVL_I(inode); - kmem_cache_free(ovl_inode_cachep, OVL_I(inode)); + kfree(oi->redirect); + mutex_destroy(&oi->lock); + kmem_cache_free(ovl_inode_cachep, oi); } static void ovl_destroy_inode(struct inode *inode) @@ -207,10 +209,6 @@ static void ovl_destroy_inode(struct inode *inode) ovl_dir_cache_free(inode); else iput(oi->lowerdata); - kfree(oi->redirect); - mutex_destroy(&oi->lock); - - call_rcu(&inode->i_rcu, ovl_i_callback); } static void ovl_free_fs(struct ovl_fs *ofs) @@ -377,6 +375,7 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data) static const struct super_operations ovl_super_operations = { .alloc_inode = ovl_alloc_inode, + .free_inode = ovl_free_inode, .destroy_inode = ovl_destroy_inode, .drop_inode = generic_delete_inode, .put_super = ovl_put_super, -- 2.11.0