Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp508535yba; Thu, 18 Apr 2019 05:13:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBGNVXDHV3P3dW2jRS/O5pBPr0plJFkTylnUx91rltgFLMl/ze0RmPCuZ+2BuKiHKwkUq9 X-Received: by 2002:a62:6490:: with SMTP id y138mr95740832pfb.230.1555589615204; Thu, 18 Apr 2019 05:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555589615; cv=none; d=google.com; s=arc-20160816; b=MGFUTuwWPAPBN5VdQduKjr9ygGPX27+WqRfKFCSi0qEKj6bHKklU01VSMf68i1Io8S jvbdGjLlESJ63jc2vgUzQg/LARFK2i2OrTAMxm37MEL9oE6vXNvNKrUTeubo0ZR39951 FFjAPf8vSg5C0cEJZQQUG2TmieZMQBVGAPAJ0d3s6IrDAc2cuvwBQSRCFkpAYJeJNm1Z JACP3WqugTJQDqeYxZ/z3kBLg/Mkmm8h93HSPYaZmOHQsEnG08sg4D/CeIExRsBJd7HY uk4b6oMHC0oTeTMPXFxGZXtKL2FdZ902ZC138oUn78Nlzer2I28gaV3qWYDJ0SnLv+Cz ew0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EXLC5hyNIYsF8Fm7DBy2PyGZj5d1KOwRDiyCYb+snY0=; b=vJGq4cXrl4Ix34cZpXLWr1Up0lGdaKo/NRGRxWW0rel2QkZLWn8HkCiRooRW4PxeFm hO1z3a7/7xLfmJA/USA+68++xs3hg3dBjTieJOwczsZ7dBpxuLbeCybSRsNIpvkOVGfY m11u6473QdDn+yjMwqhXcqBVYonHZyB0Rsq/GnNFcgiQk/c87/WWgzhRyON6CkVVxoV8 wHcGe4PHPG/JdLgXQ29bY44SkAwk21pb06a+HLjlu8p74jNLRKo4ctwWuGzo1mtVEikw hQUDOWWRgmuTTgbzVbnjoQ8mxwkmtGLiS6apuHnP1mT8J38lehVzkdctSMVeqdHb75pv sa9g== 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 f2si2025502pfd.17.2019.04.18.05.13.20; Thu, 18 Apr 2019 05:13:35 -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 S2388921AbfDRMLE (ORCPT + 99 others); Thu, 18 Apr 2019 08:11:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:49986 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727807AbfDRMLE (ORCPT ); Thu, 18 Apr 2019 08:11:04 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 665CFB077; Thu, 18 Apr 2019 12:11:02 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id ECB481E15AE; Thu, 18 Apr 2019 14:10:59 +0200 (CEST) Date: Thu, 18 Apr 2019 14:10:59 +0200 From: Jan Kara To: Al Viro Cc: Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH 54/62] ext4: make use of ->free_inode() Message-ID: <20190418121059.GH28541@quack2.suse.cz> References: <20190416174900.GT2217@ZenIV.linux.org.uk> <20190416175340.21068-1-viro@ZenIV.linux.org.uk> <20190416175340.21068-54-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416175340.21068-54-viro@ZenIV.linux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-04-19 18:53:32, Al Viro wrote: > From: Al Viro > > the rest of this ->destroy_inode() instance could probably be folded > into ext4_evict_inode() > > Signed-off-by: Al Viro Looks good to me. You can add: Reviewed-by: Jan Kara You're right about the possibility of moving the check to ext4_evict_inode() (probably ext4_clear_inode() would be the best). But we can leave that for later. Honza > --- > fs/ext4/super.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 6ed4eb81e674..981f702848e7 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1107,9 +1107,8 @@ static int ext4_drop_inode(struct inode *inode) > return drop; > } > > -static void ext4_i_callback(struct rcu_head *head) > +static void ext4_free_in_core_inode(struct inode *inode) > { > - struct inode *inode = container_of(head, struct inode, i_rcu); > kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); > } > > @@ -1124,7 +1123,6 @@ static void ext4_destroy_inode(struct inode *inode) > true); > dump_stack(); > } > - call_rcu(&inode->i_rcu, ext4_i_callback); > } > > static void init_once(void *foo) > @@ -1402,6 +1400,7 @@ static const struct quotactl_ops ext4_qctl_operations = { > > static const struct super_operations ext4_sops = { > .alloc_inode = ext4_alloc_inode, > + .free_inode = ext4_free_in_core_inode, > .destroy_inode = ext4_destroy_inode, > .write_inode = ext4_write_inode, > .dirty_inode = ext4_dirty_inode, > -- > 2.11.0 > -- Jan Kara SUSE Labs, CR