Received: by 10.213.65.68 with SMTP id h4csp142168imn; Thu, 15 Mar 2018 12:07:45 -0700 (PDT) X-Google-Smtp-Source: AG47ELulBdIy6+Yv3jAfb67POebXOVbOaW0JXnSBMFBlWS7wvYImuARcEIPpg9k4S5YmU/MUKMYM X-Received: by 10.98.73.205 with SMTP id r74mr5725529pfi.111.1521140865019; Thu, 15 Mar 2018 12:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521140864; cv=none; d=google.com; s=arc-20160816; b=StOjor37iY2u6a5kHC9BI7Eq+ddphrqe7q/3n++ONEqmtNwXTuxSTomtkQkjcRkBtn OyHjrZsaUNqo1R+rIqTir4P3AYNlAwQWtrY0r1X/GggbF8i1YKd8gg9F/NOWVsPN+z4R JptclFdVrrBiNghvNGVIlII4hy6jUcfIp0itj/5rCCiLmfYiCX6ovJ0UyiLZ9oStkJKg 3uv4/qig9SmjKXVTLy385yFd2lNEV1IUi8LBHKSukpjYZL2o6fiyyzOH9ynNuVuQfTlX WCvku9CpuQmxjFd/bEUEy+58z3wuTHPBQHVGNCSxI73+jHy/Bja2ULp0jG9y0stUYi5a kiZQ== 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=PeHwL3QZjfF4iiNV9TTxj7RQkRXEKQdK4mFnC3lsmdQ=; b=06FvFlR/HpgUShmHG5lVTrpKDi2P75xN4XlReDNUjHTW6VQicHB1l1+bw1rnE7xD2Z zsSMSQHx35jVyXoTWs8p+0BRisEP8HQ+LYrmFNIFnJtmfQYb2yfd7vcRNpv5cLcK2+AX 7oEOKIa1b4CAoyZjkmC1f31oJiCg0nztEufmqs6dglfBmxC9M7AL+bNheLwqhOtRRmvO 4WXKF8sN3QpjHmKcAtJjh7tp+FgKZYApTiF6pjtwsXSC6pNW1+3/muAHoJoHm2R08ND3 y82BaMMCU76Aq+h1DYKWy6bq0zJZF8pvfec8s+bMGfwtApNoV7X34VVZeU56zNNGcg7z 2/VA== 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 o1-v6si4494989plk.138.2018.03.15.12.07.30; Thu, 15 Mar 2018 12:07:44 -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 S932737AbeCOTG0 (ORCPT + 99 others); Thu, 15 Mar 2018 15:06:26 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:36186 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932624AbeCOTGW (ORCPT ); Thu, 15 Mar 2018 15:06:22 -0400 Received: from light.dominikbrodowski.net (isilmar.linta [10.0.0.1]) by isilmar-4.linta.de (Postfix) with ESMTPS id 68A59200917; Thu, 15 Mar 2018 19:06:18 +0000 (UTC) Received: by light.dominikbrodowski.net (Postfix, from userid 1000) id A833020347; Thu, 15 Mar 2018 20:05:38 +0100 (CET) From: Dominik Brodowski To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk Cc: luto@kernel.org, mingo@kernel.org, akpm@linux-foundation.org, arnd@arndb.de Subject: [PATCH v2 06/36] fs: add do_pipe2() helper; remove internal call to sys_pipe2() Date: Thu, 15 Mar 2018 20:04:59 +0100 Message-Id: <20180315190529.20943-7-linux@dominikbrodowski.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180315190529.20943-1-linux@dominikbrodowski.net> References: <20180315190529.20943-1-linux@dominikbrodowski.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using this helper removes an in-kernel call to the sys_pipe2() syscall. Cc: Alexander Viro Signed-off-by: Dominik Brodowski --- fs/pipe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 7b1954caf388..39d6f431da83 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -841,7 +841,7 @@ int do_pipe_flags(int *fd, int flags) * sys_pipe() is the normal C calling standard for creating * a pipe. It's not the way Unix traditionally does this, though. */ -SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) +static int do_pipe2(int __user *fildes, int flags) { struct file *files[2]; int fd[2]; @@ -863,9 +863,14 @@ SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) return error; } +SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) +{ + return do_pipe2(fildes, flags); +} + SYSCALL_DEFINE1(pipe, int __user *, fildes) { - return sys_pipe2(fildes, 0); + return do_pipe2(fildes, 0); } static int wait_for_partner(struct pipe_inode_info *pipe, unsigned int *cnt) -- 2.16.2