Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3583928yba; Tue, 16 Apr 2019 14:35:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcjEHKcZTnUMwu69n50XY8ADeX2hfhjg8y9PnfBtVyqyWFUVKa7Zab5HKH7q+So4+SFi4g X-Received: by 2002:a65:4589:: with SMTP id o9mr62292972pgq.381.1555450550030; Tue, 16 Apr 2019 14:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555450550; cv=none; d=google.com; s=arc-20160816; b=tS3dVzUMmMj/qq/1ZQ5gXMrwK2w9EZ7/b6eZI8vIHWWwlLu39gGuzdSYqXPgn+DJUi adocPEolD1883KpESrgqMp8UsDmbsRpmouO2/DsicRiVurzeCZ49w295Iocd+faWo0Ld /wWjBO0eDQT5ZgMBWJdfU/cXVPSSP2mzKndOESlvVnJOsrHV4xi2LJpBkON4GC/C+dPd PLycsGE93e36k3Jfj/Q+ENVW/sGN5muent6MWKAHyzqiyPAr5D7ycglPq6lGPE1RnTp2 RKiaOLPNdcdA+cPkxBGvEG1OTOLL0MgWclBHY9DrNsAx+wRnicwXMV34nkAWUo8ckSEB g7AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vZOuUpDP+oEE8zDag4TP7D7kvRREI+1dnU6iGVWD2sU=; b=d6aR6jgdsEKj/14hMCDo7LLnhL04qykGGqqYZCv2AjWZtLE0Oxa91COuvPnzCIwI02 iEBlOtGg9vUR1lYMPzvSyaUJnqA9QFLlXG/kWTIqEBD8x9BAo+YDk5choh0QFAvLJuFl 5mXHxY8FecCKr7NAn7PTmVyIu69ifcRkPNY9O/LHF340vzbjIknJhyeA6sPtv7O9QTUV wFdBhphDFkw9N0za52XlQoyT6RbYz2mdPis8JSIRCKMoEFJjq7iFle3Qi+39voVZT6kI rDmLg5mOaKbSwO76iYvZaaZ/sqvq1nSv+w+GUa9frCbvD+UUjqQFelVJ/kp9hbMwx2Ei FYdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FXE6OB/e"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a22si49161726plm.263.2019.04.16.14.35.34; Tue, 16 Apr 2019 14:35:50 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FXE6OB/e"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730466AbfDPVer (ORCPT + 99 others); Tue, 16 Apr 2019 17:34:47 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:38201 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726986AbfDPVer (ORCPT ); Tue, 16 Apr 2019 17:34:47 -0400 Received: by mail-qk1-f193.google.com with SMTP id g1so13131962qki.5; Tue, 16 Apr 2019 14:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vZOuUpDP+oEE8zDag4TP7D7kvRREI+1dnU6iGVWD2sU=; b=FXE6OB/ezKLiHvoQ0/xaHOaSD0SWvQJpKsvHzjQ3qihM6Zp4EklHykA/oDlbIVKvhd a56h0vTB8BorLrOQiMaIHVnZ1OvidMLdwqw20WezQyec0GRG5aOCmEAupU/tsz4A0IMW zgxT7tln40r8COh3oIhIQUCefg6LKCJYdrYv/ohVjYS+X8AIJA0IVlLjlQ7zjYRmKb1V BxGPKEJjnVHVKueoSpDdvkijE6oprlQPgah7Vl1COZ9YX0G/St6Dac1eFtq+UaB8pUTc 9yfAAGu3bDxwwUZGRkzz5aLs4knhKGOM9D6D3c6Jflqz8oI590DlDxH1c9Wp5kplFI9m WRKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vZOuUpDP+oEE8zDag4TP7D7kvRREI+1dnU6iGVWD2sU=; b=M0Rz+SGFMk2WikanAq0sOoIJQ6sYhLN6DlJw+PFnEorvgzXPA5/bHCbc971TnDhuGJ jRVCpMFOen0z1ZHZtqimfoUnMCD6JhzqN1ab/piUsi3yfCfLth2ePZqgAmO+f0IRRIbM ikpd0IcSqSycDCnIIcU3hrkFCJZ/kajFBHxfPVFRpzG0Y6Jhl0Qg3vtf1Udo3gTmEpVz iYjLdQuZhba7GPCXLKf35FL7zZ7Ysc5rApnN9NUb/1OqgQLHdfQ269p+1xcNd5qKI0vO c1DUg4ky5wC2W6Je3h6KQfmGN4KL4zPA1K3xVoInZnSXSaAf1Q6zJmDbn6dvzy81rJsK t7vQ== X-Gm-Message-State: APjAAAV1Un8fY1Lm+Zzlje+u9v3A4nO57LyfIn5tzB7+OhADsz88vB6b VDOvXPZn/p/LiI0xapyLvIcWD2kodXE047MIHeY= X-Received: by 2002:a05:620a:16c5:: with SMTP id a5mr66496802qkn.212.1555450486494; Tue, 16 Apr 2019 14:34:46 -0700 (PDT) MIME-Version: 1.0 References: <20190416174900.GT2217@ZenIV.linux.org.uk> <20190416175340.21068-1-viro@ZenIV.linux.org.uk> <20190416175340.21068-44-viro@ZenIV.linux.org.uk> In-Reply-To: From: Song Liu Date: Tue, 16 Apr 2019 14:34:35 -0700 Message-ID: Subject: Re: [RFC PATCH 44/62] bpf: switch to ->free_inode() To: Alexei Starovoitov Cc: Al Viro , Daniel Borkmann , bpf , Linus Torvalds , LKML , Linux-Fsdevel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 11:07 AM Alexei Starovoitov wrote: > > On Tue, Apr 16, 2019 at 10:55 AM Al Viro wrote: > > > > From: Al Viro > > > > Signed-off-by: Al Viro > > Acked-by: Alexei Starovoitov Acked-by: Song Liu > > > --- > > kernel/bpf/inode.c | 10 ++-------- > > 1 file changed, 2 insertions(+), 8 deletions(-) > > > > diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c > > index 4a8f390a2b82..bc53e5b20ddc 100644 > > --- a/kernel/bpf/inode.c > > +++ b/kernel/bpf/inode.c > > @@ -566,9 +566,8 @@ static int bpf_show_options(struct seq_file *m, struct dentry *root) > > return 0; > > } > > > > -static void bpf_destroy_inode_deferred(struct rcu_head *head) > > +static void bpf_free_inode(struct inode *inode) > > { > > - struct inode *inode = container_of(head, struct inode, i_rcu); > > enum bpf_type type; > > > > if (S_ISLNK(inode->i_mode)) > > @@ -578,16 +577,11 @@ static void bpf_destroy_inode_deferred(struct rcu_head *head) > > free_inode_nonrcu(inode); > > } > > > > -static void bpf_destroy_inode(struct inode *inode) > > -{ > > - call_rcu(&inode->i_rcu, bpf_destroy_inode_deferred); > > -} > > - > > static const struct super_operations bpf_super_ops = { > > .statfs = simple_statfs, > > .drop_inode = generic_delete_inode, > > .show_options = bpf_show_options, > > - .destroy_inode = bpf_destroy_inode, > > + .free_inode = bpf_free_inode, > > }; > > > > enum { > > -- > > 2.11.0 > >