Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1980594ybh; Tue, 14 Jul 2020 12:12:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNMIWDmzPW1gD2qFJzru2xilq0SydS09ZScwKkLhETw68V8DxAUJrGCuNmkrw/qgxiynH/ X-Received: by 2002:a50:9f8c:: with SMTP id c12mr5988830edf.149.1594753926694; Tue, 14 Jul 2020 12:12:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594753926; cv=none; d=google.com; s=arc-20160816; b=BY+WW6FMW//IBhDE0EnlvB2toxxrjFA16GlqjzXgNnN5U36lH5lp4O4QiJBNpUL0tw Y4TKPJJtbXopSQxT+rwg5ThAguYyY8ArHKM4ozL3KyUdIuIYKwmyKeEdnNZ3Z4Nj8zOh RrtwlHgoRxmELJP+BxABjYzHSnX46YUegsLzS2BLtkLeo8XoM/UNYNE9I616mR9hGMih UzToQPOkrcxJyp5LPT9Fuhd2gnxxhyAjfquQu93KAMqHvPbblhlMrgQaKanulkxMHbRw iGJSXvDvKs4g3jMIGf0jmq1LQbFjPqfK/BqwcXNlNwhHIcaL1LeF5hNj0WbRZmbMQ1xr 7IWg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=u1Gx992eL8IyHPne45xCbOLvqdQ4XPo321MOmSxzgfU=; b=VzcYRJKt5sIGAnJac5sc4TM4X8UNT29dXha4sz+3M/YLe2viF6DGRCninYSAas2Qf+ XPSb9vA/tvRnN1QO7B4g2uz19dVgWpjxIMCquVd8Hld3wijDuHJlLmuSAuFUrt1Awz3b BcN6hnqFdfVSZ9HtNUmRnKnfxoAThQMDyWhaMaIkf4mFAkHmQ3tcX7Db8NTele9GxnJU DVBdK3CePI+ClykrtYjQk0/RKuEXxnyyxUp2EZTFdJs3XzdRckj5L5Gnx4/zjrIydyM5 k4V7caJEb8scJB+s5v81OSduiPcNjbRfMPoDKDOHSoO8US4cRguSRSEcTNONcv+QC3SX 7hoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=S9jHOlV8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bz23si10638736ejc.195.2020.07.14.12.11.43; Tue, 14 Jul 2020 12:12:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=S9jHOlV8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731444AbgGNTJm (ORCPT + 99 others); Tue, 14 Jul 2020 15:09:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730722AbgGNTJU (ORCPT ); Tue, 14 Jul 2020 15:09:20 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E4BFC08C5DD; Tue, 14 Jul 2020 12:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=u1Gx992eL8IyHPne45xCbOLvqdQ4XPo321MOmSxzgfU=; b=S9jHOlV8j3DPsJfCv4rE/2zFKA lbw/Z2b0EPRjY6A/+OCFOibLjSPy/uRbTek0DSCaiOj6sJ47ZhY3xDsE6H/LXBdpNHE3x6E1LV0fH ilhd2hHmSCLFLNxfz+twPgKx6JP1tWhqLcNh1FY6LcDiVPbjqrltgBZCfFolC3GMVZgocNe7PY0NN ot/FWB2kF8cH8C8oo6a4BnA5w3yd5BTQpLc0nyJL55Jw8bEF1ZGQSLxtS15/nXRp1TmsBpjQQXYlr MtmCqx7dFMUMadDCDYBukDo3EsernUZvsKBImANWmtW+K+bGadnxKaBG41v8saGbGRk1V5Q3esuFr UHyIoRzQ==; Received: from [2001:4bb8:188:5f50:f037:8cfe:627e:7028] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvQIp-0005uX-1D; Tue, 14 Jul 2020 19:09:19 +0000 From: Christoph Hellwig To: linux-kernel@vger.kernel.org Cc: "H. Peter Anvin" , Song Liu , Al Viro , Linus Torvalds , linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 21/23] fs: remove ksys_dup Date: Tue, 14 Jul 2020 21:04:25 +0200 Message-Id: <20200714190427.4332-22-hch@lst.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200714190427.4332-1-hch@lst.de> References: <20200714190427.4332-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fold it into the only remaining caller. Signed-off-by: Christoph Hellwig --- fs/file.c | 7 +------ include/linux/syscalls.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/file.c b/fs/file.c index abb8b7081d7a44..85b7993165dd2f 100644 --- a/fs/file.c +++ b/fs/file.c @@ -985,7 +985,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) return ksys_dup3(oldfd, newfd, 0); } -int ksys_dup(unsigned int fildes) +SYSCALL_DEFINE1(dup, unsigned int, fildes) { int ret = -EBADF; struct file *file = fget_raw(fildes); @@ -1000,11 +1000,6 @@ int ksys_dup(unsigned int fildes) return ret; } -SYSCALL_DEFINE1(dup, unsigned int, fildes) -{ - return ksys_dup(fildes); -} - int f_dupfd(unsigned int from, struct file *file, unsigned flags) { int err; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 363baaadf8e19a..b6d90057476260 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1237,7 +1237,6 @@ asmlinkage long sys_ni_syscall(void); */ int ksys_umount(char __user *name, int flags); -int ksys_dup(unsigned int fildes); int ksys_chroot(const char __user *filename); ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); int ksys_chdir(const char __user *filename); -- 2.27.0