Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1866588pxb; Mon, 20 Sep 2021 07:08:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJxetH4vt5yNcIwbZ3Wbr8u+vgfofGRDsFbFKJ0OfJ+g/wsGhvksEHIOuLwMq5DZVdczxV X-Received: by 2002:a5d:8f91:: with SMTP id l17mr18821087iol.121.1632146901624; Mon, 20 Sep 2021 07:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632146901; cv=none; d=google.com; s=arc-20160816; b=BxnZoSuaX5OqCuFzy4KrSJJuiUuBsLsGtwZrehyKj3NTEoen/FdRisLxCqJVkoW9pe sKtHl36G0qFdqTURF+FlfMsiEupS48ZPV0pyaO6NMlnvIFPaRrWLiCh86CBW8oWaA/MC PNTv611fRI5JvHlp+ay4IMv5LgWwH1cEj9eomsaR2+5zAlpdANxExJxWUdsMRuYFfwMW Y2ELbdA8HpSSHDSq2dHBkMPjWEI65SfnKRtiwcN8DKqb+JclMeTS2nyFJrS1eCk6m2wv frd4/W/3/TX6dtm1PhpctUEs4q4rvTEeEhAbtykN+1fR15rqNtAUuxdHEyait14CMkSQ f1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=fzxVNUji38DpJbP6LjRwH3G943FyfuC6dm8NxaQ7CXA=; b=P+51RRoufXJcCctpNy/UJOcLcaKeAMMhSZoUt/TWR2PHlF86OatHrqSiZCVxvgKr4N hPAF8Fh0fmVM0SVP/opc7482Aj1QAanl6dMpI5IMg5wQBlUC89ICcVbDAOVw1WWkj8+h uENoiPMf27X8Wd3o9Oh/p1mpm9TybT3pVuw9HoI7SuJhA9EvAL1LKt+P8e5mqpvj8P+I 0TZKzpm6KIKoefIMR3ROHIhW2H34TP0vqsPeRTQA/86onMz1p8Ff45d62e2x2Os8lWYE 1GnmxPOJmtJViegCq0HYUJJfUCrOovP8nUyvYIVCc7P+khIeQtFy9a2IaUjrAYlXv9qp PdRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canishe.com header.s=fm3 header.b=KpbGNuGo; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dicaiQtZ; 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 i9si10882798ilc.6.2021.09.20.07.07.38; Mon, 20 Sep 2021 07:08:21 -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=pass header.i=@canishe.com header.s=fm3 header.b=KpbGNuGo; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dicaiQtZ; 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 S233304AbhITJ7C (ORCPT + 99 others); Mon, 20 Sep 2021 05:59:02 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:50207 "EHLO wout4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231929AbhITJ7A (ORCPT ); Mon, 20 Sep 2021 05:59:00 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 20DA43202562; Mon, 20 Sep 2021 05:57:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Sep 2021 05:57:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canishe.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=fzxVNUji38DpJbP6LjRwH3G943 FyfuC6dm8NxaQ7CXA=; b=KpbGNuGooDlzxeMYo2QgK+Ds6KK5thKZRPtuRYXxtM q2cJZIflym5vw1DFtN588N+EzO7aBbcrtbH6eWO7DpE59YQNkw+AKRiZUFak6HuA FMfJs0gdVfYKuUoGhf3jeEiWxqQFhQ6/G3ojcd4CYWruWFvv5OkbJapBxkbEqPR5 5DiUHp/2tLX7dnr8yFCNWmmKC0P/ki/ZwhKsyEw0VB/uBsqjk5yAJ43c+l9kh66F I5k51PNJ9iFlMwX8GT+L4OW0cSrrOl26cBgNjD89UkEY7/CBlfiChpn7r/lnWPGD 8l+GBTh3b1r1oa6AaQOrkv3PqPy0xGKfr6qUIytbn1iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fzxVNUji38DpJbP6L jRwH3G943FyfuC6dm8NxaQ7CXA=; b=dicaiQtZZqj5Vcyazw643YzGUPFIynh0w Jp/mczHJURDKpmbwzuBKFkRmlANCfWa8cpnTCWi7KDO0JsNy6eHB8gPo0bSXL1EN HEy3jTL52LNps6bISoNdYhhds4h+uaJKgrMm6tdygQVawu22HyxI88snSc6iNKd4 mlspv1vmCyMtmM/FKzQgpuCY8ii0v2IuNRPA4fkQ248yGa6zYIung0Paf8XHEweJ 60my4ZK8rJJnXu0GBZFk++GHtvMaWlGSHgpoEW5jwbd0yUI+6e9q82FogIHF6noj B3LISFfgwvkJjN3L39SpSuaIOV0jSUbTOQrum8CwNyEMaq93lJ6og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeivddgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefirggvlhgrnhcu ufhtvggvlhgvuceoghgsshestggrnhhishhhvgdrtghomheqnecuggftrfgrthhtvghrnh epkedujefgkedtvddttdfgvdejteelheethedukeevheefveefgedthfdtfeetgfeunecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghgsshestg grnhhishhhvgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Sep 2021 05:57:31 -0400 (EDT) From: Gaelan Steele To: Alexander Viro Cc: linux-man@vger.kernel.org, Michael Kerrisk , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Gaelan Steele Subject: [PATCH 1/2] fs: move struct linux_dirent into headers Date: Mon, 20 Sep 2021 10:56:48 +0100 Message-Id: <20210920095649.28600-1-gbs@canishe.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move the definition of linux_dirent to include/linux/dirent.h, where the newer linux_dirent64 already lives. This is done in preparation for moving both of these struct definitions into uapi/ so userspace code doesn't need to duplicate them. Signed-off-by: Gaelan Steele --- fs/readdir.c | 8 +------- include/linux/dirent.h | 7 +++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/readdir.c b/fs/readdir.c index 09e8ed7d4161..51890aeafc53 100644 --- a/fs/readdir.c +++ b/fs/readdir.c @@ -202,14 +202,8 @@ SYSCALL_DEFINE3(old_readdir, unsigned int, fd, /* * New, all-improved, singing, dancing, iBCS2-compliant getdents() - * interface. + * interface. */ -struct linux_dirent { - unsigned long d_ino; - unsigned long d_off; - unsigned short d_reclen; - char d_name[1]; -}; struct getdents_callback { struct dir_context ctx; diff --git a/include/linux/dirent.h b/include/linux/dirent.h index 99002220cd45..48e119dd3694 100644 --- a/include/linux/dirent.h +++ b/include/linux/dirent.h @@ -2,6 +2,13 @@ #ifndef _LINUX_DIRENT_H #define _LINUX_DIRENT_H +struct linux_dirent { + unsigned long d_ino; + unsigned long d_off; + unsigned short d_reclen; + char d_name[1]; +}; + struct linux_dirent64 { u64 d_ino; s64 d_off; -- 2.30.1 (Apple Git-130)