Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1979644ybh; Tue, 14 Jul 2020 12:10:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuzg8G7rJ3FVgdeui2D0FEUmB3CN2HIXoZ3gEUkZJGI+oACXBtWtTKvYLG2Rj4fOepWnT7 X-Received: by 2002:a17:906:ccd3:: with SMTP id ot19mr6419390ejb.468.1594753846027; Tue, 14 Jul 2020 12:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594753846; cv=none; d=google.com; s=arc-20160816; b=LEnHfKBkmffB5HbdKzZnpXqpwU83qcWthHQuof3c9dKCVGkBS0SMQnhlHPa0dvqOTU jmxVry2VIGZVGHI8TovFPZ39U+7JmwfiZspJrKVzbE1HeDLdwPqxT6NgGEbTmjog6YG7 SCTaETELXqgJznOA4geo3fYay39BACreR3j+E0hS3BcC6qYdK2BQG3R853BxAgIr4h2d paNc9b14VQ5tMXOoqIyIJwNW4Kp0AABGv53engSHKpVmAY5Kl1F+RQLO/l4uzYUQxGTh n+/n8bSrsiAfgPl5iGRcw1YU9wKclS15Ulpnq2bvBj1KmC2lHLIfDNeZAoTxOOIVr4fR 3u6g== 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=8TOhkMP63y+WabUPsTk9ObOGsvlUh0ZRK3HKBndfJis=; b=Ys/seYAE31zxB0eCxDyddRzP0jHMFQR5ygA3dTkMXeob9urLJezMKaWTuxIBvBM8r3 nqDMDjhZDZWYwnwsBrJGp3q31k3QA17AGwBnBIway88R0oG23eBG8fmytO9nlOC114yQ MkYHdG1iiNK71UfwUQ+MaTQoQqNSTZP24A84PtO+FYq09DqVo9jGvIfrt25+4Yiempoh bSSRLmLiHXbQhiwg5P7j1c/Vu3tFVGqrjf6/u/MUwQ5/JHvxtdwdkvXDcL/evPgJk8y2 RDIMd68NgrY1N6d+yncj+I24jPqeXunGR6Rk2TJxqazgih55b9Iy5saiH48YnfCGfWXt hONQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=jJBrjBTf; 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 me25si11993218ejb.164.2020.07.14.12.10.22; Tue, 14 Jul 2020 12:10:46 -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=jJBrjBTf; 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 S1730912AbgGNTJ6 (ORCPT + 99 others); Tue, 14 Jul 2020 15:09:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730799AbgGNTJS (ORCPT ); Tue, 14 Jul 2020 15:09:18 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F3CC08C5C1; Tue, 14 Jul 2020 12:09:18 -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=8TOhkMP63y+WabUPsTk9ObOGsvlUh0ZRK3HKBndfJis=; b=jJBrjBTfdvVPgj6+yqGcHSSakf 5+TrHG/bucDNpVb2YrcUsuXEZF1Dfb7zz+C47qPMImrm/0GmZzDVOv4cWSmLo7oU2CZLru4YVns4P V/cwAerJP9AG7akpxjDKcZJ44bc2+5JeEsxovVtdhGm/XiG/l55jClKUzQIoTFAMlGD1PVz/r0ZOY JFFTrFWdy/vWH2ekghqXzOu05o9owHT2wyDxqcrMJxKfUdkPKZVJftAnhOde2SEcj6XPrZNl11tb+ 2n+nGAZKIr7zKiviG3sY+M3AS8dmC3yVkmucMKRlewQ3GKpZk6ecr4OexuH2Tq7P20WK9Z9eMGNSi Q5xHocEQ==; 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 1jvQIl-0005to-Ps; Tue, 14 Jul 2020 19:09:16 +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 19/23] fs: remove ksys_getdents64 Date: Tue, 14 Jul 2020 21:04:23 +0200 Message-Id: <20200714190427.4332-20-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 Just open code it in the only caller. Signed-off-by: Christoph Hellwig --- fs/readdir.c | 11 ++--------- include/linux/syscalls.h | 2 -- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/readdir.c b/fs/readdir.c index a49f07c11cfbd0..19434b3c982cd3 100644 --- a/fs/readdir.c +++ b/fs/readdir.c @@ -348,8 +348,8 @@ static int filldir64(struct dir_context *ctx, const char *name, int namlen, return -EFAULT; } -int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent, - unsigned int count) +SYSCALL_DEFINE3(getdents64, unsigned int, fd, + struct linux_dirent64 __user *, dirent, unsigned int, count) { struct fd f; struct getdents_callback64 buf = { @@ -380,13 +380,6 @@ int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent, return error; } - -SYSCALL_DEFINE3(getdents64, unsigned int, fd, - struct linux_dirent64 __user *, dirent, unsigned int, count) -{ - return ksys_getdents64(fd, dirent, count); -} - #ifdef CONFIG_COMPAT struct compat_old_linux_dirent { compat_ulong_t d_ino; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 10843a6adb770d..a998651629c71b 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1243,8 +1243,6 @@ ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); int ksys_chdir(const char __user *filename); int ksys_fchmod(unsigned int fd, umode_t mode); int ksys_fchown(unsigned int fd, uid_t user, gid_t group); -int ksys_getdents64(unsigned int fd, struct linux_dirent64 __user *dirent, - unsigned int count); int ksys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); ssize_t ksys_read(unsigned int fd, char __user *buf, size_t count); void ksys_sync(void); -- 2.27.0