From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E49A72848AA for ; Fri, 23 Jan 2026 18:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769194389; cv=none; b=P81dJnWXo+KDa+Sf7vsmrichhQq2zvSqWdUOmSRLQYeTbe0aLG8xcVP6iDjOS6A5/91jyJJBK69nlskzXsBtD4pPpMgMY4p4YsBxcQwLal1qlN5E9nJr2GRUHD7IQXNC79JPoOEp9NI968e0Jdg28U879lNd4Y2JKub1iuDpZMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769194389; c=relaxed/simple; bh=RtMuM+Tj7rVhL87Kof/hUNoKu7cR7IRc+egmRISn9MA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ipFg8awQ/ypptHR/NiB4hiUbZzX4WIEpPnFOQvUIlRD4RxFn1nRz8lqwydY2yye8AK/pfRETe7u4UHAIwkZ3/JUqyPvIDBQUP5xQXDTzs+qy71bbe6t5qRc6nViIq+Z9mPmFAIhU8bADgC+GaH9IPVgB4AtOpzh1Ew/EJju5fiE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F7wKVeH9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F7wKVeH9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F40AC4CEF1; Fri, 23 Jan 2026 18:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769194388; bh=RtMuM+Tj7rVhL87Kof/hUNoKu7cR7IRc+egmRISn9MA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F7wKVeH9IuCjhal70QGfx4M+1ZLn9FD8qqAXBPxRgM0/XJHUBuhcm5SB5w/l2Q341 Zi1GxzwuRcxKKKKj1yzeX2XaifwbKM15RtRrRBAZ1x+JjY7GrjX3FY02X+G29rM5BL BKHMz/yjvqOtkGsCKxqoz7FcsKVrW27HmMlqtFZR2CWgx8CBZZ2ziiQEL7/okLzE8q 0XmCmeCXh+NC3hmRsEgMsBbAwIYmP/6S7Uhyh4iuBS1SNkxggv04gyfEQFXpHMqpRA oLLoeavT0b66GtG/oUAaIohp+SyVz2hStWGuibOvol95dxRFDlb//JBFTEYbmOCaTd 85A805KhK+n8Q== From: Chuck Lever To: NeilBrown , Jeff Layton , Olga Kornievskaia , Dai Ngo , Tom Talpey Cc: , Chuck Lever Subject: [PATCH v2 07/42] lockd: Move share.h from include/linux/lockd/ to fs/lockd/ Date: Fri, 23 Jan 2026 13:52:24 -0500 Message-ID: <20260123185259.1215767-8-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260123185259.1215767-1-cel@kernel.org> References: <20260123185259.1215767-1-cel@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever The share.h header defines struct nlm_share and declares the DOS share management functions used by the NLM server to implement NLM_SHARE and NLM_UNSHARE operations. These interfaces are used exclusively within the lockd subsystem. A git grep search confirms no external code references them. Relocating this header from include/linux/lockd/ to fs/lockd/ narrows the public API surface of the lockd module. Out-of-tree code cannot depend on these internal interfaces after this change. Future refactoring of the share management implementation thus requires no consideration of external consumers. Signed-off-by: Chuck Lever --- {include/linux => fs}/lockd/share.h | 8 +++----- fs/lockd/svc4proc.c | 2 +- fs/lockd/svcproc.c | 3 ++- fs/lockd/svcshare.c | 3 ++- fs/lockd/svcsubs.c | 3 ++- include/linux/lockd/lockd.h | 2 ++ 6 files changed, 12 insertions(+), 9 deletions(-) rename {include/linux => fs}/lockd/share.h (85%) diff --git a/include/linux/lockd/share.h b/fs/lockd/share.h similarity index 85% rename from include/linux/lockd/share.h rename to fs/lockd/share.h index 1f18a9faf645..d8f4ebd9c278 100644 --- a/include/linux/lockd/share.h +++ b/fs/lockd/share.h @@ -1,14 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * linux/include/linux/lockd/share.h - * * DOS share management for lockd. * * Copyright (C) 1996, Olaf Kirch */ -#ifndef LINUX_LOCKD_SHARE_H -#define LINUX_LOCKD_SHARE_H +#ifndef _LOCKD_SHARE_H +#define _LOCKD_SHARE_H /* * DOS share for a specific file @@ -29,4 +27,4 @@ __be32 nlmsvc_unshare_file(struct nlm_host *, struct nlm_file *, void nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *, nlm_host_match_fn_t); -#endif /* LINUX_LOCKD_SHARE_H */ +#endif /* _LOCKD_SHARE_H */ diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index eb485bc6c7dd..0be5e5ce9de1 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -11,9 +11,9 @@ #include #include #include -#include #include +#include "share.h" #include "xdr4.h" #define NLMDBG_FACILITY NLMDBG_CLIENT diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index 557dfd9c2a9e..c06b592756ee 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c @@ -11,9 +11,10 @@ #include #include #include -#include #include +#include "share.h" + #define NLMDBG_FACILITY NLMDBG_CLIENT #ifdef CONFIG_LOCKD_V4 diff --git a/fs/lockd/svcshare.c b/fs/lockd/svcshare.c index 88c81ce1148d..8e06840834c6 100644 --- a/fs/lockd/svcshare.c +++ b/fs/lockd/svcshare.c @@ -15,7 +15,8 @@ #include #include #include -#include + +#include "share.h" static inline int nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh) diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c index e3ceb0745464..827861dd788f 100644 --- a/fs/lockd/svcsubs.c +++ b/fs/lockd/svcsubs.c @@ -16,11 +16,12 @@ #include #include #include -#include #include #include #include +#include "share.h" + #define NLMDBG_FACILITY NLMDBG_SVCSUBS diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 6852bbc8f51a..1dee8ddab108 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -155,6 +155,8 @@ struct nlm_rqst { void * a_callback_data; /* sent to nlmclnt_operations callbacks */ }; +struct nlm_share; + /* * This struct describes a file held open by lockd on behalf of * an NFS client. -- 2.52.0