Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp180imm; Tue, 10 Jul 2018 19:28:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpftkHznviY7GvjEylUdCw3RP71fUGuCb11t9kyRcuXdC/eOtZx4WL8sl/J2EpQApV4hygxs X-Received: by 2002:a63:f919:: with SMTP id h25-v6mr24287704pgi.401.1531276114252; Tue, 10 Jul 2018 19:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531276114; cv=none; d=google.com; s=arc-20160816; b=jqrsAE4T0/bJfNeSkcqbR/+O8d/ap8KAMhl6E/o+pzgrtqtV4nF2NCpVjHWBu6pT28 Lfy0W7/cdxKuheHZtBnkIu9t/tvnLBm5jC7BWhYGMXYtzIbZyBQdM0ixYpj3gxamcvFR jm/kSTGo7+/eazvTZLMjUYrvrO+yONfRoLGQBAoucbbt/wyOmSFoo1GxMOuz2Pfj3N1Y 5ElogzdD34lWo9Cu4XNx0P/irioeE/KiVfGGNS9KB91ELUnD1QHtNvpZ6CK2JwY8ST5I jBgODJkjU8QpW5FiCXDsmoyAMSLqax206YPhEm+ZewD99gdalKGUhYict9LA29nUu08R 0nwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=w2RsX1dzAk0X2tczNUstF8tqc7fk3WFsVrvCBO65xhM=; b=k98zMYwzC5SyFY4KPejHgdgw/5e0KjwQtFC+diwHWqgwJPz8DwSbjYq12EILTHkl+G Awlf2XU57/Flxyz7BK7IXhkxo2JJR94zrdyx5hEXtkLkFbMF18JcZz3m+fTjp5rq7uhQ ympXr/bElkGsnpNgq0AYo4hJNmKbAEX9dlsR87IhhizpMGm25RcOuYDS8eq1gTH5j/b5 LILdwIlGbhrQP3di84CoP4qzztRP6NTbKRJqREvbKtTWRPGClJ9w4+bnOzB0hqG/Utrw muA0w3ewUp4FFyrLiimus95ZGwxi/wAltnH64ohiCVLtxvIExKWaGtkXE7/RxWoX1aam InSA== 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 s2-v6si17641311pgd.357.2018.07.10.19.28.18; Tue, 10 Jul 2018 19:28:34 -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 S1732425AbeGKCYE (ORCPT + 99 others); Tue, 10 Jul 2018 22:24:04 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:45492 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732342AbeGKCYD (ORCPT ); Tue, 10 Jul 2018 22:24:03 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fd4la-0003Ha-It; Wed, 11 Jul 2018 02:22:06 +0000 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Miklos Szeredi Subject: [RFC][PATCH 04/42] make get_empty_filp() to call file_free_rcu() directly Date: Wed, 11 Jul 2018 03:21:28 +0100 Message-Id: <20180711022206.12571-4-viro@ZenIV.linux.org.uk> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180711022206.12571-1-viro@ZenIV.linux.org.uk> References: <20180711021136.GN30522@ZenIV.linux.org.uk> <20180711022206.12571-1-viro@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Al Viro no point in rcu-delays here Signed-off-by: Al Viro --- fs/file_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/file_table.c b/fs/file_table.c index 7ec0b3e5f05d..1f14b80a4e67 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -123,11 +123,10 @@ struct file *get_empty_filp(void) if (unlikely(!f)) return ERR_PTR(-ENOMEM); - percpu_counter_inc(&nr_files); f->f_cred = get_cred(cred); error = security_file_alloc(f); if (unlikely(error)) { - file_free(f); + file_free_rcu(&f->f_u.fu_rcuhead); return ERR_PTR(error); } @@ -137,6 +136,7 @@ struct file *get_empty_filp(void) mutex_init(&f->f_pos_lock); eventpoll_init_file(f); /* f->f_version: 0 */ + percpu_counter_inc(&nr_files); return f; over: -- 2.11.0