Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp627257yba; Thu, 18 Apr 2019 07:05:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9aEboSl1IQysJmwgIA3B2PHbq7sCSl5afpvW+68aTD95/LheCxUsatlHleWW0Tnzx21Pp X-Received: by 2002:a63:ef07:: with SMTP id u7mr91003597pgh.0.1555596319290; Thu, 18 Apr 2019 07:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555596319; cv=none; d=google.com; s=arc-20160816; b=iL3S5XeV+Si3mv9Hz+iWmfjjbi+BVxWfqHFdpDY6P8lhbEyKgxSHRafFoaOZKnDwlx CFXIr2wERWXY+rfMG2VMHADqOzTqipbLqOmgrgfq9oTMlRC5S+MDMv+CSIK2ptVb6n0D 2Tn1EouHE3P6fMGpzcGxdYp6oGjMqOSpPHFOxHsPcpkvLFetkvf3cjjqVJzQ/e4XC9wO O99bN6lYlWaZsI3N+SuWbnXgjJ+wo5Gcxi7fMP3jr8/xj2K06VifSCJGXoy8PqCsc4F5 ol94j0tnEsVn4S+mOVGygVt97UbYq4t5rItxrJlqilhwTPlTQL44FQPoM74JtQLnzqWw 703Q== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=B9LamK4qeuLp6e0bBtKXGGvlBv+bVukYn0hLhgFb+qY=; b=IV3iYkdYDMlmL0cSOs06uxs56DtUzleSvuB35xsWCmkMQ4ADKgJ5jxL294sUTySVnN tJdM+QQBaOuZLuR3/f8QqooHiU4F8CS1mJ/kpUM/9jViwLTJEdP2tRGFm5c/Sk1xI/Pk 4PvoPqrlFlnK2XfbkNfu0BXyBqJ4IItrsleEr10l5Eyy3XP2h9H3Te1wxXW2xipr+X1d IBJkH/w2Hu+sEL5ZWUXsQ2upGYU+Cq0aQqyJ9MbOiLnL5ClS0YqNRTgLwgtzVKTDorQ2 G64TpMVVTRBryFbHnSe4rBh12bCuqOZVKZyBPGhuaoXSYFO5ZjdY9+76C2nW/HESoEfV WCVQ== 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 j11si2282655pff.216.2019.04.18.07.05.02; Thu, 18 Apr 2019 07:05:19 -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 S2389015AbfDROCC (ORCPT + 99 others); Thu, 18 Apr 2019 10:02:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6643 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729331AbfDROCC (ORCPT ); Thu, 18 Apr 2019 10:02:02 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id E48F829D6BD7A36F1819; Thu, 18 Apr 2019 22:01:58 +0800 (CST) Received: from [10.151.23.176] (10.151.23.176) by smtp.huawei.com (10.3.19.208) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 18 Apr 2019 22:01:53 +0800 Subject: Re: [RFC PATCH 05/62] erofs: switch to ->free_inode() To: Al Viro CC: Linus Torvalds , , , "linux-erofs@lists.ozlabs.org" , Chao Yu , Miao Xie References: <20190416174900.GT2217@ZenIV.linux.org.uk> <20190416175340.21068-1-viro@ZenIV.linux.org.uk> <20190416175340.21068-5-viro@ZenIV.linux.org.uk> From: Gao Xiang Message-ID: Date: Thu, 18 Apr 2019 22:01:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20190416175340.21068-5-viro@ZenIV.linux.org.uk> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.151.23.176] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/17 1:52, Al Viro wrote: > From: Al Viro > > Signed-off-by: Al Viro It seems more clear than before :) Thanks for taking erofs into consideration as well, Acked-by: Gao Xiang Thanks, Gao Xiang > --- > drivers/staging/erofs/super.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c > index 15c784fba879..700cbd460807 100644 > --- a/drivers/staging/erofs/super.c > +++ b/drivers/staging/erofs/super.c > @@ -57,9 +57,8 @@ static struct inode *alloc_inode(struct super_block *sb) > return &vi->vfs_inode; > } > > -static void i_callback(struct rcu_head *head) > +static void free_inode(struct inode *inode) > { > - struct inode *inode = container_of(head, struct inode, i_rcu); > struct erofs_vnode *vi = EROFS_V(inode); > > /* be careful RCU symlink path (see ext4_inode_info->i_data)! */ > @@ -71,11 +70,6 @@ static void i_callback(struct rcu_head *head) > kmem_cache_free(erofs_inode_cachep, vi); > } > > -static void destroy_inode(struct inode *inode) > -{ > - call_rcu(&inode->i_rcu, i_callback); > -} > - > static int superblock_read(struct super_block *sb) > { > struct erofs_sb_info *sbi; > @@ -668,7 +662,7 @@ static int erofs_remount(struct super_block *sb, int *flags, char *data) > const struct super_operations erofs_sops = { > .put_super = erofs_put_super, > .alloc_inode = alloc_inode, > - .destroy_inode = destroy_inode, > + .free_inode = free_inode, > .statfs = erofs_statfs, > .show_options = erofs_show_options, > .remount_fs = erofs_remount, >