From patchwork Tue Nov 12 20:25:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 13872923 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AE33219E4F for ; Tue, 12 Nov 2024 20:26:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731443183; cv=none; b=HijNIWtqFFeSlimKDhYBBJI7+20rylUGy+7Ev3dwLgnw49mD+yV/L8LVFenDJa+q5bA778k8zUY6hcDV9YIlkGedMKACiP5OY3K6LOzYuPAyRBds8sMScB9c8M3Ri6Mbjeq+67VwoS0s7ClP8EUYm4cZp8m3uUeRRTgozlUp+XE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731443183; c=relaxed/simple; bh=dz8hAZBYlkxwUWyevfCzkusNjX0GA2HGTCKjG2qP4S0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FUpEn2UpbrrK26sCIle14L20UQROt4sKVSUrOz4jEJ6GDUQeSl4KN1rdWJfIwWvzQZeRuV+2zOLQ/yx1N8GI73cFkvRuvche+iQRP6LeM1s6zRicx+CRpfCRxTjnq+CJoMAJSCTOua8kHDKyWsAzjboxD4X9NHUTP/d2kcJWAuY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=jL3gxqG8; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="jL3gxqG8" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=SntDeM1eadCkveab5L1XV2HQp4EhBxldUQDc9BWkONE=; b=jL3gxqG8j00+W5pML5YeTlJ9VO dp2N/BfIPKZhiiuUF0qyD8AOIvSuwe+8j2jNY5ene3zpEbzSkcCTPfJ2PKY63RK1saxdEBVoJ+Dsw rtcvcgAdsLhEgTTexOuijdmA7PfMGF0cIgwO7FnrnBl36P/VYrm/RK+PFxZ7vURdMn+xQ5nS6Vyja agvFyGScTvMiR8+CmDWDFDsFU+UBYKI1P2RpLbdljPHVVdwqMu2B441kC0h52/3nN+GsWjdl6kjjO w69kN2Kf9XSk17MV091+vXAYZE0hUyGCqJ4FBalbOYlpDCo/l+vvDHWejbsPdfkta4ba3uODX9cya coxwB1vA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.98 #2 (Red Hat Linux)) id 1tAxSt-0000000EEtE-2f1p; Tue, 12 Nov 2024 20:26:19 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: viro@zeniv.linux.org.uk, Christian Brauner , Jan Kara , Jens Axboe Subject: [PATCH 2/5] kill getname_statx_lookup_flags() Date: Tue, 12 Nov 2024 20:25:49 +0000 Message-ID: <20241112202552.3393751-2-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241112202552.3393751-1-viro@zeniv.linux.org.uk> References: <20241112202118.GA3387508@ZenIV> <20241112202552.3393751-1-viro@zeniv.linux.org.uk> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: Al Viro LOOKUP_EMPTY is ignored by the only remaining user, and without that 'getname_' prefix makes no sense. Remove LOOKUP_EMPTY part, rename to statx_lookup_flags() and make static. It most likely is _not_ statx() specific, either, but that's the next step. Signed-off-by: Al Viro Reviewed-by: Christian Brauner --- fs/internal.h | 1 - fs/stat.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/internal.h b/fs/internal.h index 8c1b7acbbe8f..8cf42b327e5e 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -246,7 +246,6 @@ int open_namespace(struct ns_common *ns); * fs/stat.c: */ -int getname_statx_lookup_flags(int flags); int do_statx(int dfd, struct filename *filename, unsigned int flags, unsigned int mask, struct statx __user *buffer); int do_statx_fd(int fd, unsigned int flags, unsigned int mask, diff --git a/fs/stat.c b/fs/stat.c index b74831dc7ae6..4e8698fa932f 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -231,7 +231,7 @@ int vfs_fstat(int fd, struct kstat *stat) return error; } -int getname_statx_lookup_flags(int flags) +static int statx_lookup_flags(int flags) { int lookup_flags = 0; @@ -239,8 +239,6 @@ int getname_statx_lookup_flags(int flags) lookup_flags |= LOOKUP_FOLLOW; if (!(flags & AT_NO_AUTOMOUNT)) lookup_flags |= LOOKUP_AUTOMOUNT; - if (flags & AT_EMPTY_PATH) - lookup_flags |= LOOKUP_EMPTY; return lookup_flags; } @@ -301,7 +299,7 @@ static int vfs_statx(int dfd, struct filename *filename, int flags, struct kstat *stat, u32 request_mask) { struct path path; - unsigned int lookup_flags = getname_statx_lookup_flags(flags); + unsigned int lookup_flags = statx_lookup_flags(flags); int error; if (flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT | AT_EMPTY_PATH |