From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 D7B7C2D7DD2 for ; Thu, 11 Dec 2025 12:18:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455484; cv=none; b=KQLOl41OzqfHFkIcAt0i0Atc9ZXp3Zt/Kbj2um1cYiIpA12nf+tHI896ZszHOC9tB90cotQm4YTcnV46T4SbAVoLnG4lMsNKd+/hRgozBE9Bda65coXYHiSIdSFvbTSg1hHmqkejB+v4tOsSM6WdAcf5bis2zERqhlQJEGgah7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455484; c=relaxed/simple; bh=6HT4bpIkmylfTxujLc2RbKpDqRo8DLvgdweiK6y3ANA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=srJV+U5kyKRYsy50d1tuwhijwAWPAPzynH3T2G8SzovC1nn2H0XPMhp2OJYmGcdiRwvi4k0+wOrd7V6yohaSL3/pQlFreMpoRBCDvLMF751V3ZGo/TpAgouKG6YbNwkYZhVQ+UwMJ6uhoDFtv7WR0dAdDECXw+Dikj3IoxJ1plM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KASwb4gA; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KASwb4gA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vp6OX7uL6m79SkKOoGXJJCHtSD5Ariw4GExCJNzZvKg=; b=KASwb4gA20aylIExkmmZc9d4tIK3Grc7JvmCSDOyw3z77BaHLtzVN8UMqfK1BjTbUKO2qO 7PYdpHVGLKYm4qqWUYKYlL46mlFu2n87f1+MoQYZA6Tb92ymvEMkjIbEnE5SpPNHuLopz+ qGQj7JawWXNQqOq5e3eR3w+G3NLOFRE= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-GyHwX4R2Mf-SWDxgC82YlQ-1; Thu, 11 Dec 2025 07:17:58 -0500 X-MC-Unique: GyHwX4R2Mf-SWDxgC82YlQ-1 X-Mimecast-MFC-AGG-ID: GyHwX4R2Mf-SWDxgC82YlQ_1765455477 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3DA1A1800675; Thu, 11 Dec 2025 12:17:57 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D84930001A2; Thu, 11 Dec 2025 12:17:55 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/18] cifs: Scripted clean up fs/smb/client/cached_dir.h Date: Thu, 11 Dec 2025 12:16:55 +0000 Message-ID: <20251211121715.759074-3-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cached_dir.h | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/fs/smb/client/cached_dir.h b/fs/smb/client/cached_dir.h index 1e383db7c337..f0837bb2161a 100644 --- a/fs/smb/client/cached_dir.h +++ b/fs/smb/client/cached_dir.h @@ -77,22 +77,18 @@ is_valid_cached_dir(struct cached_fid *cfid) return cfid->time && cfid->has_lease; } =20 -extern struct cached_fids *init_cached_dirs(void); -extern void free_cached_dirs(struct cached_fids *cfids); -extern int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, - const char *path, - struct cifs_sb_info *cifs_sb, - bool lookup_only, struct cached_fid **cfid); -extern int open_cached_dir_by_dentry(struct cifs_tcon *tcon, - struct dentry *dentry, - struct cached_fid **cfid); -extern void close_cached_dir(struct cached_fid *cfid); -extern void drop_cached_dir_by_name(const unsigned int xid, - struct cifs_tcon *tcon, - const char *name, - struct cifs_sb_info *cifs_sb); -extern void close_all_cached_dirs(struct cifs_sb_info *cifs_sb); -extern void invalidate_all_cached_dirs(struct cifs_tcon *tcon); -extern bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[= 16]); +struct cached_fids *init_cached_dirs(void); +void free_cached_dirs(struct cached_fids *cfids); +int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, const char *= path, + struct cifs_sb_info *cifs_sb, bool lookup_only, + struct cached_fid **ret_cfid); +int open_cached_dir_by_dentry(struct cifs_tcon *tcon, struct dentry *dentr= y, + struct cached_fid **ret_cfid); +void close_cached_dir(struct cached_fid *cfid); +void drop_cached_dir_by_name(const unsigned int xid, struct cifs_tcon *tco= n, + const char *name, struct cifs_sb_info *cifs_sb); +void close_all_cached_dirs(struct cifs_sb_info *cifs_sb); +void invalidate_all_cached_dirs(struct cifs_tcon *tcon); +bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]); =20 #endif /* _CACHED_DIR_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4B31C2F6189 for ; Thu, 11 Dec 2025 12:18:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455487; cv=none; b=r//Xj6+lFCVLL33y26w7L68P5+iDFjErQzH5eNbDu7AJNpVWSo7gjyvKqIdR+CC/imuvMYUQdGAGs/NMgbCsPWbJ1I9hif4vKJkwyGcfmQIsQ02EQitzJGWRdVKErdOb4IrrYgItdgCnEc+GgcXexpbrXCXfHAZhxScntrRcuLU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455487; c=relaxed/simple; bh=B5B1UpVLxfIVT8FXHwNiuCVnkKxhHweN84i+Ja0mBUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jAxiwIMsmEJMVV65eWYOw88ZSe3yI3E5oTiyNefW76sY86GqnX8OwcNRGTXRCiyPY+lTn6Xyl/F9B+gmC3+Djbur8vVOXsFYHA5wU6CH0xazbRtjyeSaQsDK1itEjF7FngbRyX8SIlqTxi6f0qmSiytimEMiQ+sa1zok7mNLmjc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OO+EHg6e; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OO+EHg6e" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Azyu375a0PbyVqSBelYOYqj6n7XdILlIQ8dFfw/FECA=; b=OO+EHg6eUJYXEV0ZTbsVhjqchuQ7kpvfmd8jZuetr4XcDq3u9blrHNRk6arx0Jm2ckUkut VOzycX8IRl/xQ3UHnoJAz/i6VIcOgjR6PGLGiz2cKMU12OoUlTe6FyUr/17D1LvvYjREob jPwoYjhoLGzua6m22npHi5kMFUzPdr8= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-255-dmSxYOeBMVyRmSOHxxMyAw-1; Thu, 11 Dec 2025 07:18:01 -0500 X-MC-Unique: dmSxYOeBMVyRmSOHxxMyAw-1 X-Mimecast-MFC-AGG-ID: dmSxYOeBMVyRmSOHxxMyAw_1765455480 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 62F14180060D; Thu, 11 Dec 2025 12:18:00 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 98492180049F; Thu, 11 Dec 2025 12:17:58 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/18] cifs: Scripted clean up fs/smb/client/dfs.h Date: Thu, 11 Dec 2025 12:16:56 +0000 Message-ID: <20251211121715.759074-4-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/dfs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/dfs.h b/fs/smb/client/dfs.h index e60f0a24a8a1..6b5b5ca0f55c 100644 --- a/fs/smb/client/dfs.h +++ b/fs/smb/client/dfs.h @@ -151,7 +151,8 @@ static inline void ref_walk_mark_end(struct dfs_ref_wal= k *rw) ref->tit =3D ERR_PTR(-ENOENT); /* end marker */ } =20 -int dfs_parse_target_referral(const char *full_path, const struct dfs_info= 3_param *ref, +int dfs_parse_target_referral(const char *full_path, + const struct dfs_info3_param *ref, struct smb3_fs_context *ctx); int dfs_mount_share(struct cifs_mount_ctx *mnt_ctx); From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 DB80E2F0686 for ; Thu, 11 Dec 2025 12:18:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455493; cv=none; b=u5p9BeI1iVgHM3dqfDRJfxaoAo/xXFzo2CqLP5NwaQ9lPq1Uc1ZbcdYf9B0qfmUhJLv1CyClV1dXLVHumgI8jMX6rRk6bTZSvWYrA4HzHNqW6l/+NqnIU+myhw2f7RvtGj0golsHUdar3JBfFDG/8cyCrC5eBqK7+QFrgfYKcn0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455493; c=relaxed/simple; bh=cjkGThD2KR1C18c/BDFLbZzKUh7OTN8uA+UpgLNAuyk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DNGIgsb728QwDGw4aj4k2qFp/vmSWmzk/tS05kWqpO4ZZOOnBSQE0gmtXoAaws+tz8jVhct0hdntwUtki1TtmDElTJqDZaFDwhU2uQFIzaLJOudUGUvqxS4ruNaRP4WIqbmAih5uN2GfkgbTE7Lh2ncynNH/OLjZFcsnSVEj8fE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Hh09FL6X; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Hh09FL6X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BbQ98WR2WVYi2gn2XigC2Jug93hwOUAeexJw4T7ovQU=; b=Hh09FL6XHX/+uJ8LKoj3JLSdCT3Yg+mrbXYXe7l5fQ3+OE+9sfI9ewUGDnLcpXlPLaXqop HE7Z83KwvNpPbHfFxzhdMGdynKtnsBYu7OtVm9n16XGb4efw+cZgBGvk5dDnVKGlnV78ZS bh4e5OANldq4NT+lIXsowepFhbpPUEY= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-212-B4Ixr8ZJMMO4gCTMmNnLTA-1; Thu, 11 Dec 2025 07:18:05 -0500 X-MC-Unique: B4Ixr8ZJMMO4gCTMmNnLTA-1 X-Mimecast-MFC-AGG-ID: B4Ixr8ZJMMO4gCTMmNnLTA_1765455484 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5C10D1800675; Thu, 11 Dec 2025 12:18:04 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F0C751953986; Thu, 11 Dec 2025 12:18:01 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/18] cifs: Scripted clean up fs/smb/client/cifsproto.h Date: Thu, 11 Dec 2025 12:16:57 +0000 Message-ID: <20251211121715.759074-5-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifsproto.h | 965 ++++++++++++++++++-------------------- 1 file changed, 462 insertions(+), 503 deletions(-) diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h index f8c0615d4ee4..75a474f9e99a 100644 --- a/fs/smb/client/cifsproto.h +++ b/fs/smb/client/cifsproto.h @@ -25,16 +25,15 @@ struct smb3_fs_context; ***************************************************************** */ =20 -extern struct smb_hdr *cifs_buf_get(void); -extern void cifs_buf_release(void *); -extern struct smb_hdr *cifs_small_buf_get(void); -extern void cifs_small_buf_release(void *); -extern void free_rsp_buf(int, void *); -extern int smb_send_kvec(struct TCP_Server_Info *server, - struct msghdr *msg, - size_t *sent); -extern unsigned int _get_xid(void); -extern void _free_xid(unsigned int); +struct smb_hdr *cifs_buf_get(void); +void cifs_buf_release(void *buf_to_free); +struct smb_hdr *cifs_small_buf_get(void); +void cifs_small_buf_release(void *buf_to_free); +void free_rsp_buf(int resp_buftype, void *rsp); +int smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg, + size_t *sent); +unsigned int _get_xid(void); +void _free_xid(unsigned int xid); #define get_xid() \ ({ \ unsigned int __xid =3D _get_xid(); \ @@ -55,16 +54,16 @@ do { \ else \ trace_smb3_exit_done(curr_xid, __func__); \ } while (0) -extern int init_cifs_idmap(void); -extern void exit_cifs_idmap(void); -extern int init_cifs_spnego(void); -extern void exit_cifs_spnego(void); -extern const char *build_path_from_dentry(struct dentry *, void *); -char *__build_path_from_dentry_optional_prefix(struct dentry *direntry, vo= id *page, - const char *tree, int tree_len, - bool prefix); -extern char *build_path_from_dentry_optional_prefix(struct dentry *direntr= y, - void *page, bool prefix); +int init_cifs_idmap(void); +void exit_cifs_idmap(void); +int init_cifs_spnego(void); +void exit_cifs_spnego(void); +const char *build_path_from_dentry(struct dentry *direntry, void *page); +char *__build_path_from_dentry_optional_prefix(struct dentry *direntry, + void *page, const char *tree, + int tree_len, bool prefix); +char *build_path_from_dentry_optional_prefix(struct dentry *direntry, + void *page, bool prefix); static inline void *alloc_dentry_path(void) { return __getname(); @@ -76,57 +75,56 @@ static inline void free_dentry_path(void *page) __putname(page); } =20 -extern char *cifs_build_path_to_root(struct smb3_fs_context *ctx, - struct cifs_sb_info *cifs_sb, - struct cifs_tcon *tcon, - int add_treename); +char *cifs_build_path_to_root(struct smb3_fs_context *ctx, + struct cifs_sb_info *cifs_sb, + struct cifs_tcon *tcon, int add_treename); char *cifs_build_devname(char *nodename, const char *prepath); void delete_mid(struct TCP_Server_Info *server, struct mid_q_entry *mid); -void __release_mid(struct TCP_Server_Info *server, struct mid_q_entry *mid= ); -void cifs_wake_up_task(struct TCP_Server_Info *server, struct mid_q_entry = *mid); -extern int cifs_handle_standard(struct TCP_Server_Info *server, - struct mid_q_entry *mid); -extern char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, - char dirsep); -extern int smb3_parse_devname(const char *devname, struct smb3_fs_context = *ctx); -extern int smb3_parse_opt(const char *options, const char *key, char **val= ); -extern int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs); -extern bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *r= hs); -extern int cifs_discard_remaining_data(struct TCP_Server_Info *server); -extern int cifs_call_async(struct TCP_Server_Info *server, - struct smb_rqst *rqst, - mid_receive_t receive, mid_callback_t callback, - mid_handle_t handle, void *cbdata, const int flags, - const struct cifs_credits *exist_credits); -extern struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses); -extern int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, int *resp_buf_type, - const int flags, struct kvec *resp_iov); -extern int compound_send_recv(const unsigned int xid, struct cifs_ses *ses, - struct TCP_Server_Info *server, - const int flags, const int num_rqst, - struct smb_rqst *rqst, int *resp_buf_type, - struct kvec *resp_iov); +void __release_mid(struct TCP_Server_Info *server, + struct mid_q_entry *midEntry); +void cifs_wake_up_task(struct TCP_Server_Info *server, + struct mid_q_entry *mid); +int cifs_handle_standard(struct TCP_Server_Info *server, + struct mid_q_entry *mid); +char *smb3_fs_context_fullpath(const struct smb3_fs_context *ctx, char dir= sep); +int smb3_parse_devname(const char *devname, struct smb3_fs_context *ctx); +int smb3_parse_opt(const char *options, const char *key, char **val); +int cifs_ipaddr_cmp(struct sockaddr *srcaddr, struct sockaddr *rhs); +bool cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs); +int cifs_discard_remaining_data(struct TCP_Server_Info *server); +int cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst, + mid_receive_t receive, mid_callback_t callback, + mid_handle_t handle, void *cbdata, const int flags, + const struct cifs_credits *exist_credits); +struct TCP_Server_Info *cifs_pick_channel(struct cifs_ses *ses); +int cifs_send_recv(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server, struct smb_rqst *rqst, + int *resp_buf_type, const int flags, struct kvec *resp_iov); +int compound_send_recv(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server, const int flags, + const int num_rqst, struct smb_rqst *rqst, + int *resp_buf_type, struct kvec *resp_iov); int SendReceive(const unsigned int xid, struct cifs_ses *ses, struct smb_hdr *in_buf, unsigned int in_len, - struct smb_hdr *out_buf, int *pbytes_returned, const int flags); + struct smb_hdr *out_buf, int *pbytes_returned, + const int flags); int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses, char *in_buf, unsigned int in_len, int flags); -int cifs_sync_mid_result(struct mid_q_entry *mid, struct TCP_Server_Info *= server); -struct mid_q_entry *cifs_setup_request(struct cifs_ses *ses, struct TCP_Se= rver_Info *ignored, +int cifs_sync_mid_result(struct mid_q_entry *mid, + struct TCP_Server_Info *server); +struct mid_q_entry *cifs_setup_request(struct cifs_ses *ses, + struct TCP_Server_Info *server, struct smb_rqst *rqst); struct mid_q_entry *cifs_setup_async_request(struct TCP_Server_Info *serve= r, struct smb_rqst *rqst); int __smb_send_rqst(struct TCP_Server_Info *server, int num_rqst, struct smb_rqst *rqst); -extern int cifs_check_receive(struct mid_q_entry *mid, - struct TCP_Server_Info *server, bool log_error); +int cifs_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *se= rver, + bool log_error); int wait_for_free_request(struct TCP_Server_Info *server, const int flags, unsigned int *instance); -extern int cifs_wait_mtu_credits(struct TCP_Server_Info *server, - size_t size, size_t *num, - struct cifs_credits *credits); +int cifs_wait_mtu_credits(struct TCP_Server_Info *server, size_t size, + size_t *num, struct cifs_credits *credits); =20 static inline int send_cancel(struct cifs_ses *ses, struct TCP_Server_Info *server, @@ -137,291 +135,274 @@ send_cancel(struct cifs_ses *ses, struct TCP_Server= _Info *server, server->ops->send_cancel(ses, server, rqst, mid, xid) : 0; } =20 -int wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *= midQ); -extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *, - struct kvec *, int /* nvec to send */, - int * /* type of buf returned */, const int flags, - struct kvec * /* resp vec */); +int wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *= mid); +int SendReceive2(const unsigned int xid, struct cifs_ses *ses, + struct kvec *iov, int n_vec, int *resp_buf_type /* ret */, + const int flags, struct kvec *resp_iov); =20 void smb2_query_server_interfaces(struct work_struct *work); -void -cifs_signal_cifsd_for_reconnect(struct TCP_Server_Info *server, - bool all_channels); -void -cifs_mark_tcp_ses_conns_for_reconnect(struct TCP_Server_Info *server, - bool mark_smb_session); -extern int cifs_reconnect(struct TCP_Server_Info *server, - bool mark_smb_session); -int checkSMB(char *buf, unsigned int pdu_len, unsigned int len, - struct TCP_Server_Info *srvr); -extern bool is_valid_oplock_break(char *, struct TCP_Server_Info *); -extern bool backup_cred(struct cifs_sb_info *); -extern bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 = eof, - bool from_readdir); -void cifs_write_subrequest_terminated(struct cifs_io_subrequest *wdata, ss= ize_t result); -extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *, int= ); -extern int cifs_get_writable_file(struct cifsInodeInfo *cifs_inode, - int flags, - struct cifsFileInfo **ret_file); -extern int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, - int flags, - struct cifsFileInfo **ret_file); -extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *, boo= l); -extern int cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, - struct cifsFileInfo **ret_file); -extern int cifs_get_hardlink_path(struct cifs_tcon *tcon, struct inode *in= ode, - struct file *file); -extern unsigned int smbCalcSize(void *buf); -extern int decode_negTokenInit(unsigned char *security_blob, int length, +void cifs_signal_cifsd_for_reconnect(struct TCP_Server_Info *server, + bool all_channels); +void cifs_mark_tcp_ses_conns_for_reconnect(struct TCP_Server_Info *server, + bool mark_smb_session); +int cifs_reconnect(struct TCP_Server_Info *server, bool mark_smb_session); +int checkSMB(char *buf, unsigned int pdu_len, unsigned int total_read, + struct TCP_Server_Info *server); +bool is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv); +bool backup_cred(struct cifs_sb_info *cifs_sb); +bool is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_= file, + bool from_readdir); +void cifs_write_subrequest_terminated(struct cifs_io_subrequest *wdata, + ssize_t result); +struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *cifs_inode, + int flags); +int cifs_get_writable_file(struct cifsInodeInfo *cifs_inode, int flags, + struct cifsFileInfo **ret_file); +int cifs_get_writable_path(struct cifs_tcon *tcon, const char *name, int f= lags, + struct cifsFileInfo **ret_file); +struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *cifs_inode, + bool fsuid_only); +int cifs_get_readable_path(struct cifs_tcon *tcon, const char *name, + struct cifsFileInfo **ret_file); +int cifs_get_hardlink_path(struct cifs_tcon *tcon, struct inode *inode, + struct file *file); +unsigned int smbCalcSize(void *buf); +int decode_negTokenInit(unsigned char *security_blob, int length, struct TCP_Server_Info *server); -extern int cifs_convert_address(struct sockaddr *dst, const char *src, int= len); -extern void cifs_set_port(struct sockaddr *addr, const unsigned short int = port); -extern int map_smb_to_linux_error(char *buf, bool logErr); -extern int map_and_check_smb_error(struct TCP_Server_Info *server, - struct mid_q_entry *mid, bool logErr); +int cifs_convert_address(struct sockaddr *dst, const char *src, int len); +void cifs_set_port(struct sockaddr *addr, const unsigned short int port); +int map_smb_to_linux_error(char *buf, bool logErr); +int map_and_check_smb_error(struct TCP_Server_Info *server, + struct mid_q_entry *mid, bool logErr); unsigned int header_assemble(struct smb_hdr *buffer, char smb_command, const struct cifs_tcon *treeCon, int word_count - /* length of fixed section word count in two byte units */); -extern int small_smb_init_no_tc(const int smb_cmd, const int wct, - struct cifs_ses *ses, - void **request_buf); -extern int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, - struct TCP_Server_Info *server, - const struct nls_table *nls_cp); -extern struct timespec64 cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_16= 01); -extern u64 cifs_UnixTimeToNT(struct timespec64); -extern struct timespec64 cnvrtDosUnixTm(__le16 le_date, __le16 le_time, - int offset); -extern void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplo= ck); -extern int cifs_get_writer(struct cifsInodeInfo *cinode); -extern void cifs_put_writer(struct cifsInodeInfo *cinode); -extern void cifs_done_oplock_break(struct cifsInodeInfo *cinode); -extern int cifs_unlock_range(struct cifsFileInfo *cfile, - struct file_lock *flock, const unsigned int xid); -extern int cifs_push_mandatory_locks(struct cifsFileInfo *cfile); - -extern void cifs_down_write(struct rw_semaphore *sem); + /* length of fixed section (word count) in two byte units */); +int small_smb_init_no_tc(const int smb_command, const int wct, + struct cifs_ses *ses, void **request_buf); +int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server, + const struct nls_table *nls_cp); +struct timespec64 cifs_NTtimeToUnix(__le64 ntutc); +u64 cifs_UnixTimeToNT(struct timespec64 t); +struct timespec64 cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offse= t); +void cifs_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock); +int cifs_get_writer(struct cifsInodeInfo *cinode); +void cifs_put_writer(struct cifsInodeInfo *cinode); +void cifs_done_oplock_break(struct cifsInodeInfo *cinode); +int cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, + unsigned int xid); +int cifs_push_mandatory_locks(struct cifsFileInfo *cfile); + +void cifs_down_write(struct rw_semaphore *sem); struct cifsFileInfo *cifs_new_fileinfo(struct cifs_fid *fid, struct file *= file, struct tcon_link *tlink, __u32 oplock, const char *symlink_target); -extern int cifs_posix_open(const char *full_path, struct inode **inode, - struct super_block *sb, int mode, - unsigned int f_flags, __u32 *oplock, __u16 *netfid, - unsigned int xid); +int cifs_posix_open(const char *full_path, struct inode **pinode, + struct super_block *sb, int mode, unsigned int f_flags, + __u32 *poplock, __u16 *pnetfid, unsigned int xid); void cifs_fill_uniqueid(struct super_block *sb, struct cifs_fattr *fattr); -extern void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, - FILE_UNIX_BASIC_INFO *info, - struct cifs_sb_info *cifs_sb); -extern void cifs_dir_info_to_fattr(struct cifs_fattr *, FILE_DIRECTORY_INF= O *, - struct cifs_sb_info *); -extern int cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fat= tr, - bool from_readdir); -extern struct inode *cifs_iget(struct super_block *sb, - struct cifs_fattr *fattr); +void cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, + FILE_UNIX_BASIC_INFO *info, + struct cifs_sb_info *cifs_sb); +void cifs_dir_info_to_fattr(struct cifs_fattr *fattr, + FILE_DIRECTORY_INFO *info, + struct cifs_sb_info *cifs_sb); +int cifs_fattr_to_inode(struct inode *inode, struct cifs_fattr *fattr, + bool from_readdir); +struct inode *cifs_iget(struct super_block *sb, struct cifs_fattr *fattr); =20 int cifs_get_inode_info(struct inode **inode, const char *full_path, - struct cifs_open_info_data *data, struct super_block *sb, int xid, + struct cifs_open_info_data *data, + struct super_block *sb, int xid, const struct cifs_fid *fid); -extern int smb311_posix_get_inode_info(struct inode **inode, - const char *full_path, - struct cifs_open_info_data *data, - struct super_block *sb, - const unsigned int xid); -extern int cifs_get_inode_info_unix(struct inode **pinode, - const unsigned char *search_path, - struct super_block *sb, unsigned int xid); -extern int cifs_set_file_info(struct inode *inode, struct iattr *attrs, - unsigned int xid, const char *full_path, __u32 dosattr); -extern int cifs_rename_pending_delete(const char *full_path, - struct dentry *dentry, - const unsigned int xid); -extern int sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid, - struct cifs_fattr *fattr, uint sidtype); -extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, - struct cifs_fattr *fattr, struct inode *inode, - bool get_mode_from_special_sid, - const char *path, const struct cifs_fid *pfid); -extern int id_mode_to_cifs_acl(struct inode *inode, const char *path, __u6= 4 *pnmode, - kuid_t uid, kgid_t gid); -extern struct smb_ntsd *get_cifs_acl(struct cifs_sb_info *cifssmb, struct = inode *ino, - const char *path, u32 *plen, u32 info); -extern struct smb_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifssb, - const struct cifs_fid *pfid, u32 *plen, u32 info); -extern struct posix_acl *cifs_get_acl(struct mnt_idmap *idmap, - struct dentry *dentry, int type); -extern int cifs_set_acl(struct mnt_idmap *idmap, - struct dentry *dentry, struct posix_acl *acl, int type); -extern int set_cifs_acl(struct smb_ntsd *pntsd, __u32 len, struct inode *i= no, - const char *path, int flag); -extern unsigned int setup_authusers_ACE(struct smb_ace *pace); -extern unsigned int setup_special_mode_ACE(struct smb_ace *pace, - bool posix, - __u64 nmode); -extern unsigned int setup_special_user_owner_ACE(struct smb_ace *pace); - -void dequeue_mid(struct TCP_Server_Info *server, struct mid_q_entry *mid, = bool malformed); -extern int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, - unsigned int to_read); -extern ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server, - size_t to_read); +int smb311_posix_get_inode_info(struct inode **inode, const char *full_pat= h, + struct cifs_open_info_data *data, + struct super_block *sb, + const unsigned int xid); +int cifs_get_inode_info_unix(struct inode **pinode, + const unsigned char *full_path, + struct super_block *sb, unsigned int xid); +int cifs_set_file_info(struct inode *inode, struct iattr *attrs, + unsigned int xid, const char *full_path, __u32 dosattr); +int cifs_rename_pending_delete(const char *full_path, struct dentry *dentr= y, + const unsigned int xid); +int sid_to_id(struct cifs_sb_info *cifs_sb, struct smb_sid *psid, + struct cifs_fattr *fattr, uint sidtype); +int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, struct cifs_fattr *fat= tr, + struct inode *inode, bool mode_from_special_sid, + const char *path, const struct cifs_fid *pfid); +int id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 *pnmo= de, + kuid_t uid, kgid_t gid); +struct smb_ntsd *get_cifs_acl(struct cifs_sb_info *cifs_sb, + struct inode *inode, const char *path, + u32 *pacllen, u32 info); +struct smb_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb, + const struct cifs_fid *cifsfid, + u32 *pacllen, u32 info); +struct posix_acl *cifs_get_acl(struct mnt_idmap *idmap, struct dentry *den= try, + int type); +int cifs_set_acl(struct mnt_idmap *idmap, struct dentry *dentry, + struct posix_acl *acl, int type); +int set_cifs_acl(struct smb_ntsd *pnntsd, __u32 acllen, struct inode *inod= e, + const char *path, int aclflag); +unsigned int setup_authusers_ACE(struct smb_ace *pntace); +unsigned int setup_special_mode_ACE(struct smb_ace *pntace, bool posix, + __u64 nmode); +unsigned int setup_special_user_owner_ACE(struct smb_ace *pntace); + +void dequeue_mid(struct TCP_Server_Info *server, struct mid_q_entry *mid, + bool malformed); +int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, + unsigned int to_read); +ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server, + size_t to_read); int cifs_read_iter_from_socket(struct TCP_Server_Info *server, - struct iov_iter *iter, - unsigned int to_read); -extern int cifs_setup_cifs_sb(struct cifs_sb_info *cifs_sb); + struct iov_iter *iter, unsigned int to_read); +int cifs_setup_cifs_sb(struct cifs_sb_info *cifs_sb); void cifs_mount_put_conns(struct cifs_mount_ctx *mnt_ctx); int cifs_mount_get_session(struct cifs_mount_ctx *mnt_ctx); int cifs_is_path_remote(struct cifs_mount_ctx *mnt_ctx); int cifs_mount_get_tcon(struct cifs_mount_ctx *mnt_ctx); -extern int cifs_match_super(struct super_block *, void *); -extern int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context= *ctx); -extern void cifs_umount(struct cifs_sb_info *); -extern void cifs_mark_open_files_invalid(struct cifs_tcon *tcon); -extern void cifs_reopen_persistent_handles(struct cifs_tcon *tcon); - -extern bool cifs_find_lock_conflict(struct cifsFileInfo *cfile, __u64 offs= et, - __u64 length, __u8 type, __u16 flags, - struct cifsLockInfo **conf_lock, - int rw_check); -extern void cifs_add_pending_open(struct cifs_fid *fid, +int cifs_match_super(struct super_block *sb, void *data); +int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx); +void cifs_umount(struct cifs_sb_info *cifs_sb); +void cifs_mark_open_files_invalid(struct cifs_tcon *tcon); +void cifs_reopen_persistent_handles(struct cifs_tcon *tcon); + +bool cifs_find_lock_conflict(struct cifsFileInfo *cfile, __u64 offset, + __u64 length, __u8 type, __u16 flags, + struct cifsLockInfo **conf_lock, int rw_check); +void cifs_add_pending_open(struct cifs_fid *fid, struct tcon_link *tlink, + struct cifs_pending_open *open); +void cifs_add_pending_open_locked(struct cifs_fid *fid, struct tcon_link *tlink, struct cifs_pending_open *open); -extern void cifs_add_pending_open_locked(struct cifs_fid *fid, - struct tcon_link *tlink, - struct cifs_pending_open *open); -extern void cifs_del_pending_open(struct cifs_pending_open *open); +void cifs_del_pending_open(struct cifs_pending_open *open); =20 -extern bool cifs_is_deferred_close(struct cifsFileInfo *cfile, - struct cifs_deferred_close **dclose); +bool cifs_is_deferred_close(struct cifsFileInfo *cfile, + struct cifs_deferred_close **pdclose); =20 -extern void cifs_add_deferred_close(struct cifsFileInfo *cfile, - struct cifs_deferred_close *dclose); +void cifs_add_deferred_close(struct cifsFileInfo *cfile, + struct cifs_deferred_close *dclose); =20 -extern void cifs_del_deferred_close(struct cifsFileInfo *cfile); +void cifs_del_deferred_close(struct cifsFileInfo *cfile); =20 -extern void cifs_close_deferred_file(struct cifsInodeInfo *cifs_inode); +void cifs_close_deferred_file(struct cifsInodeInfo *cifs_inode); =20 -extern void cifs_close_all_deferred_files(struct cifs_tcon *cifs_tcon); +void cifs_close_all_deferred_files(struct cifs_tcon *tcon); =20 -void cifs_close_deferred_file_under_dentry(struct cifs_tcon *cifs_tcon, +void cifs_close_deferred_file_under_dentry(struct cifs_tcon *tcon, struct dentry *dentry); =20 -extern void cifs_mark_open_handles_for_deleted_file(struct inode *inode, - const char *path); +void cifs_mark_open_handles_for_deleted_file(struct inode *inode, + const char *path); =20 -extern struct TCP_Server_Info * -cifs_get_tcp_session(struct smb3_fs_context *ctx, - struct TCP_Server_Info *primary_server); -extern void cifs_put_tcp_session(struct TCP_Server_Info *server, - int from_reconnect); -extern void cifs_put_tcon(struct cifs_tcon *tcon, enum smb3_tcon_ref_trace= trace); +struct TCP_Server_Info *cifs_get_tcp_session(struct smb3_fs_context *ctx, + struct TCP_Server_Info *primary_server); +void cifs_put_tcp_session(struct TCP_Server_Info *server, int from_reconne= ct); +void cifs_put_tcon(struct cifs_tcon *tcon, enum smb3_tcon_ref_trace trace); =20 -extern void cifs_release_automount_timer(void); +void cifs_release_automount_timer(void); =20 void cifs_proc_init(void); void cifs_proc_clean(void); =20 -extern void cifs_move_llist(struct list_head *source, struct list_head *de= st); -extern void cifs_free_llist(struct list_head *llist); -extern void cifs_del_lock_waiters(struct cifsLockInfo *lock); +void cifs_move_llist(struct list_head *source, struct list_head *dest); +void cifs_free_llist(struct list_head *llist); +void cifs_del_lock_waiters(struct cifsLockInfo *lock); =20 int cifs_tree_connect(const unsigned int xid, struct cifs_tcon *tcon); =20 -extern int cifs_negotiate_protocol(const unsigned int xid, - struct cifs_ses *ses, - struct TCP_Server_Info *server); -extern int cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, - struct TCP_Server_Info *server, - struct nls_table *nls_info); -extern int cifs_enable_signing(struct TCP_Server_Info *server, bool mnt_si= gn_required); -extern int CIFSSMBNegotiate(const unsigned int xid, - struct cifs_ses *ses, +int cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses, struct TCP_Server_Info *server); - -extern int CIFSTCon(const unsigned int xid, struct cifs_ses *ses, - const char *tree, struct cifs_tcon *tcon, - const struct nls_table *); - -extern int CIFSFindFirst(const unsigned int xid, struct cifs_tcon *tcon, - const char *searchName, struct cifs_sb_info *cifs_sb, - __u16 *searchHandle, __u16 search_flags, - struct cifs_search_info *psrch_inf, - bool msearch); - -extern int CIFSFindNext(const unsigned int xid, struct cifs_tcon *tcon, - __u16 searchHandle, __u16 search_flags, - struct cifs_search_info *psrch_inf); - -extern int CIFSFindClose(const unsigned int xid, struct cifs_tcon *tcon, - const __u16 search_handle); - -extern int CIFSSMBQFileInfo(const unsigned int xid, struct cifs_tcon *tcon, - u16 netfid, FILE_ALL_INFO *pFindData); -extern int CIFSSMBQPathInfo(const unsigned int xid, struct cifs_tcon *tcon, - const char *search_Name, FILE_ALL_INFO *data, - int legacy /* whether to use old info level */, - const struct nls_table *nls_codepage, int remap); -extern int SMBQueryInformation(const unsigned int xid, struct cifs_tcon *t= con, - const char *search_name, FILE_ALL_INFO *data, - const struct nls_table *nls_codepage, int remap); - -extern int CIFSSMBUnixQFileInfo(const unsigned int xid, struct cifs_tcon *= tcon, - u16 netfid, FILE_UNIX_BASIC_INFO *pFindData); -extern int CIFSSMBUnixQPathInfo(const unsigned int xid, - struct cifs_tcon *tcon, - const unsigned char *searchName, - FILE_UNIX_BASIC_INFO *pFindData, +int cifs_setup_session(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server, + struct nls_table *nls_info); +int cifs_enable_signing(struct TCP_Server_Info *server, + bool mnt_sign_required); +int CIFSSMBNegotiate(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server); + +int CIFSTCon(const unsigned int xid, struct cifs_ses *ses, const char *tre= e, + struct cifs_tcon *tcon, const struct nls_table *nls_codepage); + +int CIFSFindFirst(const unsigned int xid, struct cifs_tcon *tcon, + const char *searchName, struct cifs_sb_info *cifs_sb, + __u16 *pnetfid, __u16 search_flags, + struct cifs_search_info *psrch_inf, bool msearch); + +int CIFSFindNext(const unsigned int xid, struct cifs_tcon *tcon, + __u16 searchHandle, __u16 search_flags, + struct cifs_search_info *psrch_inf); + +int CIFSFindClose(const unsigned int xid, struct cifs_tcon *tcon, + const __u16 searchHandle); + +int CIFSSMBQFileInfo(const unsigned int xid, struct cifs_tcon *tcon, + u16 netfid, FILE_ALL_INFO *pFindData); +int CIFSSMBQPathInfo(const unsigned int xid, struct cifs_tcon *tcon, + const char *search_name, FILE_ALL_INFO *data, + int legacy /* old style infolevel */, + const struct nls_table *nls_codepage, int remap); +int SMBQueryInformation(const unsigned int xid, struct cifs_tcon *tcon, + const char *search_name, FILE_ALL_INFO *data, const struct nls_table *nls_codepage, int remap); =20 -extern int CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, - const char *search_name, - struct dfs_info3_param **target_nodes, - unsigned int *num_of_nodes, - const struct nls_table *nls_codepage, int remap); - -extern int parse_dfs_referrals(struct get_dfs_referral_rsp *rsp, u32 rsp_s= ize, - unsigned int *num_of_nodes, - struct dfs_info3_param **target_nodes, - const struct nls_table *nls_codepage, int remap, - const char *searchName, bool is_unicode); -extern void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, - struct cifs_sb_info *cifs_sb, - struct smb3_fs_context *ctx); -extern int CIFSSMBQFSInfo(const unsigned int xid, struct cifs_tcon *tcon, - struct kstatfs *FSData); -extern int SMBOldQFSInfo(const unsigned int xid, struct cifs_tcon *tcon, - struct kstatfs *FSData); -extern int CIFSSMBSetFSUnixInfo(const unsigned int xid, struct cifs_tcon *= tcon, - __u64 cap); - -extern int CIFSSMBQFSAttributeInfo(const unsigned int xid, - struct cifs_tcon *tcon); -extern int CIFSSMBQFSDeviceInfo(const unsigned int xid, struct cifs_tcon *= tcon); -extern int CIFSSMBQFSUnixInfo(const unsigned int xid, struct cifs_tcon *tc= on); -extern int CIFSSMBQFSPosixInfo(const unsigned int xid, struct cifs_tcon *t= con, +int CIFSSMBUnixQFileInfo(const unsigned int xid, struct cifs_tcon *tcon, + u16 netfid, FILE_UNIX_BASIC_INFO *pFindData); +int CIFSSMBUnixQPathInfo(const unsigned int xid, struct cifs_tcon *tcon, + const unsigned char *searchName, + FILE_UNIX_BASIC_INFO *pFindData, + const struct nls_table *nls_codepage, int remap); + +int CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses, + const char *search_name, + struct dfs_info3_param **target_nodes, + unsigned int *num_of_nodes, + const struct nls_table *nls_codepage, int remap); + +int parse_dfs_referrals(struct get_dfs_referral_rsp *rsp, u32 rsp_size, + unsigned int *num_of_nodes, + struct dfs_info3_param **target_nodes, + const struct nls_table *nls_codepage, int remap, + const char *searchName, bool is_unicode); +void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon, + struct cifs_sb_info *cifs_sb, + struct smb3_fs_context *ctx); +int CIFSSMBQFSInfo(const unsigned int xid, struct cifs_tcon *tcon, + struct kstatfs *FSData); +int SMBOldQFSInfo(const unsigned int xid, struct cifs_tcon *tcon, + struct kstatfs *FSData); +int CIFSSMBSetFSUnixInfo(const unsigned int xid, struct cifs_tcon *tcon, + __u64 cap); + +int CIFSSMBQFSAttributeInfo(const unsigned int xid, struct cifs_tcon *tcon= ); +int CIFSSMBQFSDeviceInfo(const unsigned int xid, struct cifs_tcon *tcon); +int CIFSSMBQFSUnixInfo(const unsigned int xid, struct cifs_tcon *tcon); +int CIFSSMBQFSPosixInfo(const unsigned int xid, struct cifs_tcon *tcon, struct kstatfs *FSData); =20 -extern int SMBSetInformation(const unsigned int xid, struct cifs_tcon *tco= n, - const char *fileName, __le32 attributes, __le64 write_time, - const struct nls_table *nls_codepage, - struct cifs_sb_info *cifs_sb); -extern int CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tc= on, - const char *fileName, const FILE_BASIC_INFO *data, - const struct nls_table *nls_codepage, - struct cifs_sb_info *cifs_sb); -extern int CIFSSMBSetFileInfo(const unsigned int xid, struct cifs_tcon *tc= on, - const FILE_BASIC_INFO *data, __u16 fid, - __u32 pid_of_opener); -extern int CIFSSMBSetFileDisposition(const unsigned int xid, - struct cifs_tcon *tcon, - bool delete_file, __u16 fid, - __u32 pid_of_opener); -extern int CIFSSMBSetEOF(const unsigned int xid, struct cifs_tcon *tcon, - const char *file_name, __u64 size, - struct cifs_sb_info *cifs_sb, bool set_allocation, - struct dentry *dentry); -extern int CIFSSMBSetFileSize(const unsigned int xid, struct cifs_tcon *tc= on, - struct cifsFileInfo *cfile, __u64 size, - bool set_allocation); +int SMBSetInformation(const unsigned int xid, struct cifs_tcon *tcon, + const char *fileName, __le32 attributes, + __le64 write_time, const struct nls_table *nls_codepage, + struct cifs_sb_info *cifs_sb); +int CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon, + const char *fileName, const FILE_BASIC_INFO *data, + const struct nls_table *nls_codepage, + struct cifs_sb_info *cifs_sb); +int CIFSSMBSetFileInfo(const unsigned int xid, struct cifs_tcon *tcon, + const FILE_BASIC_INFO *data, __u16 fid, + __u32 pid_of_opener); +int CIFSSMBSetFileDisposition(const unsigned int xid, struct cifs_tcon *tc= on, + bool delete_file, __u16 fid, + __u32 pid_of_opener); +int CIFSSMBSetEOF(const unsigned int xid, struct cifs_tcon *tcon, + const char *file_name, __u64 size, + struct cifs_sb_info *cifs_sb, bool set_allocation, + struct dentry *dentry); +int CIFSSMBSetFileSize(const unsigned int xid, struct cifs_tcon *tcon, + struct cifsFileInfo *cfile, __u64 size, + bool set_allocation); =20 struct cifs_unix_set_info_args { __u64 ctime; @@ -433,184 +414,170 @@ struct cifs_unix_set_info_args { dev_t device; }; =20 -extern int CIFSSMBUnixSetFileInfo(const unsigned int xid, - struct cifs_tcon *tcon, - const struct cifs_unix_set_info_args *args, - u16 fid, u32 pid_of_opener); - -extern int CIFSSMBUnixSetPathInfo(const unsigned int xid, - struct cifs_tcon *tcon, const char *file_name, - const struct cifs_unix_set_info_args *args, - const struct nls_table *nls_codepage, - int remap); - -extern int CIFSSMBMkDir(const unsigned int xid, struct inode *inode, - umode_t mode, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb); -extern int CIFSSMBRmDir(const unsigned int xid, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb); -extern int CIFSPOSIXDelFile(const unsigned int xid, struct cifs_tcon *tcon, - const char *name, __u16 type, - const struct nls_table *nls_codepage, - int remap_special_chars); -extern int CIFSSMBDelFile(const unsigned int xid, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb, - struct dentry *dentry); +int CIFSSMBUnixSetFileInfo(const unsigned int xid, struct cifs_tcon *tcon, + const struct cifs_unix_set_info_args *args, u16 fid, + u32 pid_of_opener); + +int CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon, + const char *file_name, + const struct cifs_unix_set_info_args *args, + const struct nls_table *nls_codepage, int remap); + +int CIFSSMBMkDir(const unsigned int xid, struct inode *inode, umode_t mode, + struct cifs_tcon *tcon, const char *name, + struct cifs_sb_info *cifs_sb); +int CIFSSMBRmDir(const unsigned int xid, struct cifs_tcon *tcon, + const char *name, struct cifs_sb_info *cifs_sb); +int CIFSPOSIXDelFile(const unsigned int xid, struct cifs_tcon *tcon, + const char *fileName, __u16 type, + const struct nls_table *nls_codepage, int remap); +int CIFSSMBDelFile(const unsigned int xid, struct cifs_tcon *tcon, + const char *name, struct cifs_sb_info *cifs_sb, + struct dentry *dentry); int CIFSSMBRename(const unsigned int xid, struct cifs_tcon *tcon, - struct dentry *source_dentry, - const char *from_name, const char *to_name, - struct cifs_sb_info *cifs_sb); -extern int CIFSSMBRenameOpenFile(const unsigned int xid, struct cifs_tcon = *tcon, - int netfid, const char *target_name, - const struct nls_table *nls_codepage, - int remap_special_chars); -int CIFSCreateHardLink(const unsigned int xid, - struct cifs_tcon *tcon, - struct dentry *source_dentry, - const char *from_name, const char *to_name, - struct cifs_sb_info *cifs_sb); -extern int CIFSUnixCreateHardLink(const unsigned int xid, - struct cifs_tcon *tcon, - const char *fromName, const char *toName, - const struct nls_table *nls_codepage, - int remap_special_chars); -extern int CIFSUnixCreateSymLink(const unsigned int xid, - struct cifs_tcon *tcon, - const char *fromName, const char *toName, - const struct nls_table *nls_codepage, int remap); -extern int CIFSSMBUnixQuerySymLink(const unsigned int xid, - struct cifs_tcon *tcon, - const unsigned char *searchName, char **syminfo, - const struct nls_table *nls_codepage, int remap); -extern int cifs_query_reparse_point(const unsigned int xid, - struct cifs_tcon *tcon, - struct cifs_sb_info *cifs_sb, - const char *full_path, - u32 *tag, struct kvec *rsp, - int *rsp_buftype); -extern struct inode *cifs_create_reparse_inode(struct cifs_open_info_data = *data, - struct super_block *sb, - const unsigned int xid, - struct cifs_tcon *tcon, - const char *full_path, - bool directory, - struct kvec *reparse_iov, - struct kvec *xattr_iov); -extern int CIFSSMB_set_compression(const unsigned int xid, - struct cifs_tcon *tcon, __u16 fid); -extern int CIFS_open(const unsigned int xid, struct cifs_open_parms *oparm= s, - int *oplock, FILE_ALL_INFO *buf); -extern int SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon, - const char *fileName, const int disposition, - const int access_flags, const int omode, - __u16 *netfid, int *pOplock, FILE_ALL_INFO *, - const struct nls_table *nls_codepage, int remap); -extern int CIFSPOSIXCreate(const unsigned int xid, struct cifs_tcon *tcon, - u32 posix_flags, __u64 mode, __u16 *netfid, - FILE_UNIX_BASIC_INFO *pRetData, - __u32 *pOplock, const char *name, - const struct nls_table *nls_codepage, int remap); -extern int CIFSSMBClose(const unsigned int xid, struct cifs_tcon *tcon, - const int smb_file_id); - -extern int CIFSSMBFlush(const unsigned int xid, struct cifs_tcon *tcon, - const int smb_file_id); - -extern int CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_pa= rms, - unsigned int *nbytes, char **buf, - int *return_buf_type); -extern int CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_p= arms, - unsigned int *nbytes, const char *buf); -extern int CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_= parms, - unsigned int *nbytes, struct kvec *iov, const int nvec); -extern int CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon = *tcon, - const char *search_name, __u64 *inode_number, - const struct nls_table *nls_codepage, - int remap); - -extern int cifs_lockv(const unsigned int xid, struct cifs_tcon *tcon, - const __u16 netfid, const __u8 lock_type, - const __u32 num_unlock, const __u32 num_lock, - LOCKING_ANDX_RANGE *buf); -extern int CIFSSMBLock(const unsigned int xid, struct cifs_tcon *tcon, - const __u16 netfid, const __u32 netpid, const __u64 len, - const __u64 offset, const __u32 numUnlock, - const __u32 numLock, const __u8 lockType, - const bool waitFlag, const __u8 oplock_level); -extern int CIFSSMBPosixLock(const unsigned int xid, struct cifs_tcon *tcon, - const __u16 smb_file_id, const __u32 netpid, - const loff_t start_offset, const __u64 len, - struct file_lock *, const __u16 lock_type, - const bool waitFlag); -extern int CIFSSMBTDis(const unsigned int xid, struct cifs_tcon *tcon); -extern int CIFSSMBEcho(struct TCP_Server_Info *server); -extern int CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses); - -extern struct cifs_ses *sesInfoAlloc(void); -extern void sesInfoFree(struct cifs_ses *); -extern struct cifs_tcon *tcon_info_alloc(bool dir_leases_enabled, - enum smb3_tcon_ref_trace trace); -extern void tconInfoFree(struct cifs_tcon *tcon, enum smb3_tcon_ref_trace = trace); - -extern int cifs_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *s= erver, + struct dentry *source_dentry, const char *from_name, + const char *to_name, struct cifs_sb_info *cifs_sb); +int CIFSSMBRenameOpenFile(const unsigned int xid, struct cifs_tcon *pTcon, + int netfid, const char *target_name, + const struct nls_table *nls_codepage, int remap); +int CIFSCreateHardLink(const unsigned int xid, struct cifs_tcon *tcon, + struct dentry *source_dentry, const char *from_name, + const char *to_name, struct cifs_sb_info *cifs_sb); +int CIFSUnixCreateHardLink(const unsigned int xid, struct cifs_tcon *tcon, + const char *fromName, const char *toName, + const struct nls_table *nls_codepage, int remap); +int CIFSUnixCreateSymLink(const unsigned int xid, struct cifs_tcon *tcon, + const char *fromName, const char *toName, + const struct nls_table *nls_codepage, int remap); +int CIFSSMBUnixQuerySymLink(const unsigned int xid, struct cifs_tcon *tcon, + const unsigned char *searchName, + char **symlinkinfo, + const struct nls_table *nls_codepage, int remap); +int cifs_query_reparse_point(const unsigned int xid, struct cifs_tcon *tco= n, + struct cifs_sb_info *cifs_sb, + const char *full_path, u32 *tag, struct kvec *rsp, + int *rsp_buftype); +struct inode *cifs_create_reparse_inode(struct cifs_open_info_data *data, + struct super_block *sb, + const unsigned int xid, + struct cifs_tcon *tcon, + const char *full_path, bool directory, + struct kvec *reparse_iov, + struct kvec *xattr_iov); +int CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon, + __u16 fid); +int CIFS_open(const unsigned int xid, struct cifs_open_parms *oparms, + int *oplock, FILE_ALL_INFO *buf); +int SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon, + const char *fileName, const int openDisposition, + const int access_flags, const int create_options, + __u16 *netfid, int *pOplock, FILE_ALL_INFO *pfile_info, + const struct nls_table *nls_codepage, int remap); +int CIFSPOSIXCreate(const unsigned int xid, struct cifs_tcon *tcon, + __u32 posix_flags, __u64 mode, __u16 *netfid, + FILE_UNIX_BASIC_INFO *pRetData, __u32 *pOplock, + const char *name, const struct nls_table *nls_codepage, + int remap); +int CIFSSMBClose(const unsigned int xid, struct cifs_tcon *tcon, + int smb_file_id); + +int CIFSSMBFlush(const unsigned int xid, struct cifs_tcon *tcon, + int smb_file_id); + +int CIFSSMBRead(const unsigned int xid, struct cifs_io_parms *io_parms, + unsigned int *nbytes, char **buf, int *pbuf_type); +int CIFSSMBWrite(const unsigned int xid, struct cifs_io_parms *io_parms, + unsigned int *nbytes, const char *buf); +int CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms, + unsigned int *nbytes, struct kvec *iov, int n_vec); +int CIFSGetSrvInodeNumber(const unsigned int xid, struct cifs_tcon *tcon, + const char *search_name, __u64 *inode_number, + const struct nls_table *nls_codepage, int remap); + +int cifs_lockv(const unsigned int xid, struct cifs_tcon *tcon, + const __u16 netfid, const __u8 lock_type, + const __u32 num_unlock, const __u32 num_lock, + LOCKING_ANDX_RANGE *buf); +int CIFSSMBLock(const unsigned int xid, struct cifs_tcon *tcon, + const __u16 smb_file_id, const __u32 netpid, const __u64 len, + const __u64 offset, const __u32 numUnlock, const __u32 numLock, + const __u8 lockType, const bool waitFlag, + const __u8 oplock_level); +int CIFSSMBPosixLock(const unsigned int xid, struct cifs_tcon *tcon, + const __u16 smb_file_id, const __u32 netpid, + const loff_t start_offset, const __u64 len, + struct file_lock *pLockData, const __u16 lock_type, + const bool waitFlag); +int CIFSSMBTDis(const unsigned int xid, struct cifs_tcon *tcon); +int CIFSSMBEcho(struct TCP_Server_Info *server); +int CIFSSMBLogoff(const unsigned int xid, struct cifs_ses *ses); + +struct cifs_ses *sesInfoAlloc(void); +void sesInfoFree(struct cifs_ses *buf_to_free); +struct cifs_tcon *tcon_info_alloc(bool dir_leases_enabled, + enum smb3_tcon_ref_trace trace); +void tconInfoFree(struct cifs_tcon *tcon, enum smb3_tcon_ref_trace trace); + +int cifs_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *server, __u32 *pexpected_response_sequence_number); int cifs_verify_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server, __u32 expected_sequence_number); -extern int setup_ntlmv2_rsp(struct cifs_ses *, const struct nls_table *); -extern void cifs_crypto_secmech_release(struct TCP_Server_Info *server); -extern int calc_seckey(struct cifs_ses *); -extern int generate_smb30signingkey(struct cifs_ses *ses, - struct TCP_Server_Info *server); -extern int generate_smb311signingkey(struct cifs_ses *ses, - struct TCP_Server_Info *server); +int setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp); +void cifs_crypto_secmech_release(struct TCP_Server_Info *server); +int calc_seckey(struct cifs_ses *ses); +int generate_smb30signingkey(struct cifs_ses *ses, + struct TCP_Server_Info *server); +int generate_smb311signingkey(struct cifs_ses *ses, + struct TCP_Server_Info *server); =20 #ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY -extern ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tc= on, - const unsigned char *searchName, - const unsigned char *ea_name, char *EAData, - size_t bufsize, struct cifs_sb_info *cifs_sb); -extern int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon, - const char *fileName, const char *ea_name, - const void *ea_value, const __u16 ea_value_len, - const struct nls_table *nls_codepage, - struct cifs_sb_info *cifs_sb); -extern int CIFSSMBGetCIFSACL(const unsigned int xid, struct cifs_tcon *tco= n, - __u16 fid, struct smb_ntsd **acl_inf, __u32 *buflen, __u32 info); -extern int CIFSSMBSetCIFSACL(const unsigned int, struct cifs_tcon *, __u16, - struct smb_ntsd *pntsd, __u32 len, int aclflag); -extern int cifs_do_get_acl(const unsigned int xid, struct cifs_tcon *tcon, - const unsigned char *searchName, - struct posix_acl **acl, const int acl_type, - const struct nls_table *nls_codepage, int remap); -extern int cifs_do_set_acl(const unsigned int xid, struct cifs_tcon *tcon, - const unsigned char *fileName, - const struct posix_acl *acl, const int acl_type, - const struct nls_table *nls_codepage, int remap); -extern int CIFSGetExtAttr(const unsigned int xid, struct cifs_tcon *tcon, - const int netfid, __u64 *pExtAttrBits, __u64 *pMask); +ssize_t CIFSSMBQAllEAs(const unsigned int xid, struct cifs_tcon *tcon, + const unsigned char *searchName, + const unsigned char *ea_name, char *EAData, + size_t buf_size, struct cifs_sb_info *cifs_sb); +int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon, + const char *fileName, const char *ea_name, + const void *ea_value, const __u16 ea_value_len, + const struct nls_table *nls_codepage, + struct cifs_sb_info *cifs_sb); +int CIFSSMBGetCIFSACL(const unsigned int xid, struct cifs_tcon *tcon, + __u16 fid, struct smb_ntsd **acl_inf, __u32 *pbuflen, + __u32 info); +int CIFSSMBSetCIFSACL(const unsigned int xid, struct cifs_tcon *tcon, + __u16 fid, struct smb_ntsd *pntsd, __u32 acllen, + int aclflag); +int cifs_do_get_acl(const unsigned int xid, struct cifs_tcon *tcon, + const unsigned char *searchName, struct posix_acl **acl, + const int acl_type, const struct nls_table *nls_codepage, + int remap); +int cifs_do_set_acl(const unsigned int xid, struct cifs_tcon *tcon, + const unsigned char *fileName, const struct posix_acl *acl, + const int acl_type, const struct nls_table *nls_codepage, + int remap); +int CIFSGetExtAttr(const unsigned int xid, struct cifs_tcon *tcon, + const int netfid, __u64 *pExtAttrBits, __u64 *pMask); #endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */ -extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); -extern bool couldbe_mf_symlink(const struct cifs_fattr *fattr); -extern int check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, - struct cifs_sb_info *cifs_sb, - struct cifs_fattr *fattr, - const unsigned char *path); -extern int E_md4hash(const unsigned char *passwd, unsigned char *p16, - const struct nls_table *codepage); +void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); +bool couldbe_mf_symlink(const struct cifs_fattr *fattr); +int check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, + struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr, + const unsigned char *path); +int E_md4hash(const unsigned char *passwd, unsigned char *p16, + const struct nls_table *codepage); =20 -extern struct TCP_Server_Info * -cifs_find_tcp_session(struct smb3_fs_context *ctx); +struct TCP_Server_Info *cifs_find_tcp_session(struct smb3_fs_context *ctx); =20 struct cifs_tcon *cifs_setup_ipc(struct cifs_ses *ses, bool seal); =20 void __cifs_put_smb_ses(struct cifs_ses *ses); =20 -extern struct cifs_ses * -cifs_get_smb_ses(struct TCP_Server_Info *server, struct smb3_fs_context *c= tx); +struct cifs_ses *cifs_get_smb_ses(struct TCP_Server_Info *server, + struct smb3_fs_context *ctx); =20 int cifs_async_readv(struct cifs_io_subrequest *rdata); -int cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry = *mid); +int cifs_readv_receive(struct TCP_Server_Info *server, + struct mid_q_entry *mid); =20 void cifs_async_writev(struct cifs_io_subrequest *wdata); int cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, @@ -621,46 +588,41 @@ int cifs_create_mf_symlink(unsigned int xid, struct c= ifs_tcon *tcon, struct cifs_sb_info *cifs_sb, const unsigned char *path, char *pbuf, unsigned int *pbytes_written); -int __cifs_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *s= erver, - char *signature, struct cifs_calc_sig_ctx *ctx); -enum securityEnum cifs_select_sectype(struct TCP_Server_Info *, - enum securityEnum); +int __cifs_calc_signature(struct smb_rqst *rqst, + struct TCP_Server_Info *server, char *signature, + struct cifs_calc_sig_ctx *ctx); +enum securityEnum cifs_select_sectype(struct TCP_Server_Info *server, + enum securityEnum requested); =20 int cifs_alloc_hash(const char *name, struct shash_desc **sdesc); void cifs_free_hash(struct shash_desc **sdesc); =20 int cifs_try_adding_channels(struct cifs_ses *ses); -int smb3_update_ses_channels(struct cifs_ses *ses, struct TCP_Server_Info = *server, - bool from_reconnect, bool disable_mchan); +int smb3_update_ses_channels(struct cifs_ses *ses, + struct TCP_Server_Info *server, + bool from_reconnect, bool disable_mchan); bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *if= ace); =20 -int -cifs_ses_get_chan_index(struct cifs_ses *ses, - struct TCP_Server_Info *server); -void -cifs_chan_set_in_reconnect(struct cifs_ses *ses, - struct TCP_Server_Info *server); -void -cifs_chan_clear_in_reconnect(struct cifs_ses *ses, +int cifs_ses_get_chan_index(struct cifs_ses *ses, + struct TCP_Server_Info *server); +void cifs_chan_set_in_reconnect(struct cifs_ses *ses, + struct TCP_Server_Info *server); +void cifs_chan_clear_in_reconnect(struct cifs_ses *ses, + struct TCP_Server_Info *server); +void cifs_chan_set_need_reconnect(struct cifs_ses *ses, + struct TCP_Server_Info *server); +void cifs_chan_clear_need_reconnect(struct cifs_ses *ses, + struct TCP_Server_Info *server); +bool cifs_chan_needs_reconnect(struct cifs_ses *ses, struct TCP_Server_Info *server); -void -cifs_chan_set_need_reconnect(struct cifs_ses *ses, - struct TCP_Server_Info *server); -void -cifs_chan_clear_need_reconnect(struct cifs_ses *ses, +bool cifs_chan_is_iface_active(struct cifs_ses *ses, struct TCP_Server_Info *server); -bool -cifs_chan_needs_reconnect(struct cifs_ses *ses, - struct TCP_Server_Info *server); -bool -cifs_chan_is_iface_active(struct cifs_ses *ses, - struct TCP_Server_Info *server); -void -cifs_decrease_secondary_channels(struct cifs_ses *ses, bool disable_mchan); -void -cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *serve= r); -int -SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon, bo= ol in_mount); +void cifs_decrease_secondary_channels(struct cifs_ses *ses, + bool disable_mchan); +void cifs_chan_update_iface(struct cifs_ses *ses, + struct TCP_Server_Info *server); +int SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon, + bool in_mount); =20 void extract_unc_hostname(const char *unc, const char **h, size_t *len); int copy_path_name(char *dst, const char *src); @@ -673,9 +635,8 @@ void cifs_put_tcp_super(struct super_block *sb); int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix); char *extract_hostname(const char *unc); char *extract_sharename(const char *unc); -int parse_reparse_point(struct reparse_data_buffer *buf, - u32 plen, struct cifs_sb_info *cifs_sb, - const char *full_path, +int parse_reparse_point(struct reparse_data_buffer *buf, u32 plen, + struct cifs_sb_info *cifs_sb, const char *full_path, struct cifs_open_info_data *data); int __cifs_sfu_make_node(unsigned int xid, struct inode *inode, struct dentry *dentry, struct cifs_tcon *tcon, @@ -696,14 +657,12 @@ static inline int get_dfs_path(const unsigned int xid= , struct cifs_ses *ses, referral, NULL); } =20 -int match_target_ip(struct TCP_Server_Info *server, - const char *host, size_t hostlen, - bool *result); +int match_target_ip(struct TCP_Server_Info *server, const char *host, + size_t hostlen, bool *result); int cifs_inval_name_dfs_link_error(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, - const char *full_path, - bool *islink); + const char *full_path, bool *islink); #else static inline int cifs_inval_name_dfs_link_error(const unsigned int xid, struct cifs_tcon *tcon, From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4F0A22D978D for ; Thu, 11 Dec 2025 12:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455495; cv=none; b=H7/vGsjEY4Y5l/ukoCa01SMMECl/Kg3LSXIY/6l0EyL1Ozc0ZnbZTMhFRZatamRk1mJX1HANmg+LmRLk0cWkmH1HBlvzuJbuu+LSgWEpLkU/os0JfFvhvYQhPzlzGVv2/HSooUthIfpjyu0gEGkbpn5ph3Ntli2vBd+cHsS4060= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455495; c=relaxed/simple; bh=7YeUtAWwc1Q/OF+xWa0k6gLeoVvf794K1nDWjz/6u3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PjHXq70OBZ2pUvbZgH6EFdfqU2pMnXsnysStv5i3YdTUBOQH4AIseZerIhPKKpeIW+4KDYLjLuquFHsVOJnLVxFbIaCofYappV+/j5boGC/XKpqrEt9GC7ADR5uT3/81rN4XieN1IPV//pqrxwQJOJqqjYRWye2u0/6stOmz/8s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=egcZIBeH; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="egcZIBeH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DcvtLl6W0LGaN+onglGxp4ViPysCQEHvxK5LsOGIXAE=; b=egcZIBeHm3dugybm5mmsa45U7pXOfH4KTlQEg1RFDs+UPCdvDkf+bnDehLIgp4HkNqp5bE 3pFXhuJTE5G9P+MoRS4Kv9544/O6TSMj7baQ1oWLUl7RilVlvL9L/KoDM8EElYQ74aaPI9 SiqGZCq90q1RhsHDPkLhDiplm7yOxzQ= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-211-e1Hl0ynsPf-oYmx7XktrtQ-1; Thu, 11 Dec 2025 07:18:09 -0500 X-MC-Unique: e1Hl0ynsPf-oYmx7XktrtQ-1 X-Mimecast-MFC-AGG-ID: e1Hl0ynsPf-oYmx7XktrtQ_1765455487 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D024C1800378; Thu, 11 Dec 2025 12:18:07 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E1C971953984; Thu, 11 Dec 2025 12:18:05 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/18] cifs: Scripted clean up fs/smb/client/cifs_unicode.h Date: Thu, 11 Dec 2025 12:16:58 +0000 Message-ID: <20251211121715.759074-6-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifs_unicode.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/fs/smb/client/cifs_unicode.h b/fs/smb/client/cifs_unicode.h index 6e4b99786498..9249db3b78c3 100644 --- a/fs/smb/client/cifs_unicode.h +++ b/fs/smb/client/cifs_unicode.h @@ -55,19 +55,20 @@ #define SFU_MAP_UNI_RSVD 2 =20 int cifs_from_utf16(char *to, const __le16 *from, int tolen, int fromlen, - const struct nls_table *cp, int map_type); + const struct nls_table *codepage, int map_type); int cifs_utf16_bytes(const __le16 *from, int maxbytes, const struct nls_table *codepage); -int cifs_strtoUTF16(__le16 *, const char *, int, const struct nls_table *); +int cifs_strtoUTF16(__le16 *to, const char *from, int len, + const struct nls_table *codepage); char *cifs_strndup_from_utf16(const char *src, const int maxlen, const bool is_unicode, const struct nls_table *codepage); -extern int cifsConvertToUTF16(__le16 *target, const char *source, int maxl= en, - const struct nls_table *cp, int mapChars); -extern int cifs_remap(struct cifs_sb_info *cifs_sb); -extern __le16 *cifs_strndup_to_utf16(const char *src, const int maxlen, - int *utf16_len, const struct nls_table *cp, - int remap); +int cifsConvertToUTF16(__le16 *target, const char *source, int srclen, + const struct nls_table *cp, int map_chars); +int cifs_remap(struct cifs_sb_info *cifs_sb); +__le16 *cifs_strndup_to_utf16(const char *src, const int maxlen, + int *utf16_len, const struct nls_table *cp, + int remap); wchar_t cifs_toupper(wchar_t in); =20 #endif /* _CIFS_UNICODE_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 C15852C11CE for ; Thu, 11 Dec 2025 12:18:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455500; cv=none; b=uA5EFJwfVlD0ro+hZw7PZjVsHi3/KFQ0HujeVu6AxX3QG9naZAKUfwt5hacDwcyFe30rRiwycNLQUVF2jCRowqLNLXOJhoulTrh+mh00rOmb3gwAwvmQYt75GJPiziJSJYgVsax9l0/84S/+nWX1MLmm/RwJKLJfcNuHOfX1iP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455500; c=relaxed/simple; bh=WUHmRUnzqNPwEhuk1TuFL7+GybFR3BK5bT0LH/vyASk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cn+ftL4l1TTnB/FHxQfaPIkm5sYLxMBLYU4/y2w7DPHAhCl8cGEEwXQpcz8Po3Tn/8oO4QS2cOpZsawvVY9eH+muGy3yXkRzI734DEdfNzo5WyNdjWii/e1/T/HCDVfGsvjsL3JQwu7b02Nn0ErXhEwjX2JmAsAvhdpxx58aC2Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=F7b7nYcu; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F7b7nYcu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O8+H9Ob/mTH0hxN19qOue5SWqY4tfGh4uckSGOp+AJQ=; b=F7b7nYcuBkklamh9zC7+LJIYkDs+SKrwOR2CUyf+vrachjJ9OSLs48m8TyeAa/sYh9CstQ LEbldEOfLHRXpdoA0NVAx86G1sEH+X7JCZeEZ4z0bDVkEOBf6HSXzPOC+tAQ+l3+14NxBd uG4YYpw53W7vZHHnO6wmeZiULHAdjE0= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-492-8sPofmFCPUKZEuNbjWANUg-1; Thu, 11 Dec 2025 07:18:12 -0500 X-MC-Unique: 8sPofmFCPUKZEuNbjWANUg-1 X-Mimecast-MFC-AGG-ID: 8sPofmFCPUKZEuNbjWANUg_1765455491 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 31F6A18011EE; Thu, 11 Dec 2025 12:18:11 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6C079180045B; Thu, 11 Dec 2025 12:18:09 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/18] cifs: Scripted clean up fs/smb/client/netlink.h Date: Thu, 11 Dec 2025 12:16:59 +0000 Message-ID: <20251211121715.759074-7-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/netlink.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/netlink.h b/fs/smb/client/netlink.h index e2fa8ed24c54..d35eef981b6b 100644 --- a/fs/smb/client/netlink.h +++ b/fs/smb/client/netlink.h @@ -10,7 +10,7 @@ =20 extern struct genl_family cifs_genl_family; =20 -extern int cifs_genl_init(void); -extern void cifs_genl_exit(void); +int cifs_genl_init(void); +void cifs_genl_exit(void); =20 #endif /* _CIFS_NETLINK_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 0ECFB2D978D for ; Thu, 11 Dec 2025 12:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455502; cv=none; b=NhtuFtwLWN32l2bY3XopzYrJna+BoM7vBGeKbvqFZFvWibmqa9mQ5CN/FlOcIYtuibDXowCcUZZJHzgB9+IW3O+LAn1+1uizqk79U0tLLQt7h6FnjZzhhOz9OkCTU9Si888RBeFemKlWq96SfLp20OZQyzvOWRUmqLgliFWx/+E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455502; c=relaxed/simple; bh=0ijP/xejHpLuaOUCYTJNPLJzUy+MQtjorZuawJ0Gr80=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZQVbHEgTa8BoqwR0kAUnd0+L4fAVW5MQ9Eg82vAP6zDBroIrGcPIzi+mLM7JmjxGB6TGP5BOT6FqXRvV6/7/qrYyFmbKrss7Bfd/+nf0/vmLZQjujrLatFee8V1M1ROHVtIUA4Rir/JtaoMtayJsNQJHpk2QHra1Oa2Q/tT97uQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IyNT6F5d; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IyNT6F5d" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NZ+y5YOn1a6/5fJow6XPiKpeXvFN/R4NS+wzW5n64nc=; b=IyNT6F5dCSFTFRRLtBbndTqAlCv+Qdh++SdnKStAfOlCsBqcxy9TOJjuWVZHm7HHA0ot0+ RZOutY8oiPSv4HVFSWuAoV3vtrwBQ5AFz6cGd29qc/D92szIzHM3r+GoE+wDJlp5z2x6th 3L8wyw4AnE0QUT2zJ5IdR0h9FLbVHXA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-8g8NDiZ7ND-9PiXou5JD9A-1; Thu, 11 Dec 2025 07:18:15 -0500 X-MC-Unique: 8g8NDiZ7ND-9PiXou5JD9A-1 X-Mimecast-MFC-AGG-ID: 8g8NDiZ7ND-9PiXou5JD9A_1765455494 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 35654195609E; Thu, 11 Dec 2025 12:18:14 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 74C181800357; Thu, 11 Dec 2025 12:18:12 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/18] cifs: Scripted clean up fs/smb/client/cifsfs.h Date: Thu, 11 Dec 2025 12:17:00 +0000 Message-ID: <20251211121715.759074-8-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifsfs.h | 114 +++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h index e9534258d1ef..e9d160375e86 100644 --- a/fs/smb/client/cifsfs.h +++ b/fs/smb/client/cifsfs.h @@ -43,40 +43,41 @@ extern const struct address_space_operations cifs_addr_= ops; extern const struct address_space_operations cifs_addr_ops_smallbuf; =20 /* Functions related to super block operations */ -extern void cifs_sb_active(struct super_block *sb); -extern void cifs_sb_deactive(struct super_block *sb); +void cifs_sb_active(struct super_block *sb); +void cifs_sb_deactive(struct super_block *sb); =20 /* Functions related to inodes */ extern const struct inode_operations cifs_dir_inode_ops; -extern struct inode *cifs_root_iget(struct super_block *); -extern int cifs_create(struct mnt_idmap *, struct inode *, - struct dentry *, umode_t, bool excl); -extern int cifs_atomic_open(struct inode *, struct dentry *, - struct file *, unsigned, umode_t); -extern struct dentry *cifs_lookup(struct inode *, struct dentry *, - unsigned int); -extern int cifs_unlink(struct inode *dir, struct dentry *dentry); -extern int cifs_hardlink(struct dentry *, struct inode *, struct dentry *); -extern int cifs_mknod(struct mnt_idmap *, struct inode *, struct dentry *, - umode_t, dev_t); -extern struct dentry *cifs_mkdir(struct mnt_idmap *, struct inode *, struc= t dentry *, - umode_t); -extern int cifs_rmdir(struct inode *, struct dentry *); -extern int cifs_rename2(struct mnt_idmap *, struct inode *, - struct dentry *, struct inode *, struct dentry *, - unsigned int); -extern int cifs_revalidate_file_attr(struct file *filp); -extern int cifs_revalidate_dentry_attr(struct dentry *); -extern int cifs_revalidate_file(struct file *filp); -extern int cifs_revalidate_dentry(struct dentry *); -extern int cifs_revalidate_mapping(struct inode *inode); -extern int cifs_zap_mapping(struct inode *inode); -extern int cifs_getattr(struct mnt_idmap *, const struct path *, - struct kstat *, u32, unsigned int); -extern int cifs_setattr(struct mnt_idmap *, struct dentry *, - struct iattr *); -extern int cifs_fiemap(struct inode *, struct fiemap_extent_info *, u64 st= art, - u64 len); +struct inode *cifs_root_iget(struct super_block *sb); +int cifs_create(struct mnt_idmap *idmap, struct inode *inode, + struct dentry *direntry, umode_t mode, bool excl); +int cifs_atomic_open(struct inode *inode, struct dentry *direntry, + struct file *file, unsigned int oflags, umode_t mode); +struct dentry *cifs_lookup(struct inode *parent_dir_inode, + struct dentry *direntry, unsigned int flags); +int cifs_unlink(struct inode *dir, struct dentry *dentry); +int cifs_hardlink(struct dentry *old_file, struct inode *inode, + struct dentry *direntry); +int cifs_mknod(struct mnt_idmap *idmap, struct inode *inode, + struct dentry *direntry, umode_t mode, dev_t device_number); +struct dentry *cifs_mkdir(struct mnt_idmap *idmap, struct inode *inode, + struct dentry *direntry, umode_t mode); +int cifs_rmdir(struct inode *inode, struct dentry *direntry); +int cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, + struct dentry *source_dentry, struct inode *target_dir, + struct dentry *target_dentry, unsigned int flags); +int cifs_revalidate_file_attr(struct file *filp); +int cifs_revalidate_dentry_attr(struct dentry *dentry); +int cifs_revalidate_file(struct file *filp); +int cifs_revalidate_dentry(struct dentry *dentry); +int cifs_revalidate_mapping(struct inode *inode); +int cifs_zap_mapping(struct inode *inode); +int cifs_getattr(struct mnt_idmap *idmap, const struct path *path, + struct kstat *stat, u32 request_mask, unsigned int flags); +int cifs_setattr(struct mnt_idmap *idmap, struct dentry *direntry, + struct iattr *attrs); +int cifs_fiemap(struct inode *inode, struct fiemap_extent_info *fei, u64 s= tart, + u64 len); =20 extern const struct inode_operations cifs_file_inode_ops; extern const struct inode_operations cifs_symlink_inode_ops; @@ -91,54 +92,55 @@ extern const struct file_operations cifs_file_strict_op= s; /* if strictio mnt */ extern const struct file_operations cifs_file_nobrl_ops; /* no brlocks */ extern const struct file_operations cifs_file_direct_nobrl_ops; extern const struct file_operations cifs_file_strict_nobrl_ops; -extern int cifs_open(struct inode *inode, struct file *file); -extern int cifs_close(struct inode *inode, struct file *file); -extern int cifs_closedir(struct inode *inode, struct file *file); -extern ssize_t cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to); -extern ssize_t cifs_strict_writev(struct kiocb *iocb, struct iov_iter *fro= m); +int cifs_open(struct inode *inode, struct file *file); +int cifs_close(struct inode *inode, struct file *file); +int cifs_closedir(struct inode *inode, struct file *file); +ssize_t cifs_strict_readv(struct kiocb *iocb, struct iov_iter *to); +ssize_t cifs_strict_writev(struct kiocb *iocb, struct iov_iter *from); ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from); ssize_t cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter); -extern int cifs_flock(struct file *pfile, int cmd, struct file_lock *plock= ); -extern int cifs_lock(struct file *, int, struct file_lock *); -extern int cifs_fsync(struct file *, loff_t, loff_t, int); -extern int cifs_strict_fsync(struct file *, loff_t, loff_t, int); -extern int cifs_flush(struct file *, fl_owner_t id); +int cifs_flock(struct file *file, int cmd, struct file_lock *fl); +int cifs_lock(struct file *file, int cmd, struct file_lock *flock); +int cifs_fsync(struct file *file, loff_t start, loff_t end, int datasync); +int cifs_strict_fsync(struct file *file, loff_t start, loff_t end, + int datasync); +int cifs_flush(struct file *file, fl_owner_t id); int cifs_file_mmap_prepare(struct vm_area_desc *desc); int cifs_file_strict_mmap_prepare(struct vm_area_desc *desc); extern const struct file_operations cifs_dir_ops; -extern int cifs_readdir(struct file *file, struct dir_context *ctx); +int cifs_readdir(struct file *file, struct dir_context *ctx); =20 /* Functions related to dir entries */ extern const struct dentry_operations cifs_dentry_ops; extern const struct dentry_operations cifs_ci_dentry_ops; =20 -extern struct vfsmount *cifs_d_automount(struct path *path); +struct vfsmount *cifs_d_automount(struct path *path); =20 /* Functions related to symlinks */ -extern const char *cifs_get_link(struct dentry *, struct inode *, - struct delayed_call *); -extern int cifs_symlink(struct mnt_idmap *idmap, struct inode *inode, - struct dentry *direntry, const char *symname); +const char *cifs_get_link(struct dentry *dentry, struct inode *inode, + struct delayed_call *done); +int cifs_symlink(struct mnt_idmap *idmap, struct inode *inode, + struct dentry *direntry, const char *symname); =20 #ifdef CONFIG_CIFS_XATTR extern const struct xattr_handler * const cifs_xattr_handlers[]; -extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); +ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_siz= e); #else # define cifs_xattr_handlers NULL # define cifs_listxattr NULL #endif =20 -extern ssize_t cifs_file_copychunk_range(unsigned int xid, - struct file *src_file, loff_t off, - struct file *dst_file, loff_t destoff, - size_t len, unsigned int flags); +ssize_t cifs_file_copychunk_range(unsigned int xid, struct file *src_file, + loff_t off, struct file *dst_file, + loff_t destoff, size_t len, + unsigned int flags); =20 -extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long= arg); -extern void cifs_setsize(struct inode *inode, loff_t offset); +long cifs_ioctl(struct file *filep, unsigned int command, unsigned long ar= g); +void cifs_setsize(struct inode *inode, loff_t offset); =20 struct smb3_fs_context; -extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type, - int flags, struct smb3_fs_context *ctx); +struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type, int fl= ags, + struct smb3_fs_context *old_ctx); =20 #ifdef CONFIG_CIFS_NFSD_EXPORT extern const struct export_operations cifs_export_ops; From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 9510B2FDC22 for ; Thu, 11 Dec 2025 12:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455507; cv=none; b=mGwNmiBQyZ7omakthGV0YxDwqx1ZSIbrvrPWCA2/UGf2sq1V2XsY0nSw8+BDEEiBRmA8OnhOdBkAkw37YhUbU5h2n9uwlI+SUr/Zo0H785v17wKBr3myLom17Ka8SlbKtZsRJlnPZhDumJGKSRHAYiP8JMBK0bTgaElUNkj7DrE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455507; c=relaxed/simple; bh=oMNuP5eMo7QZMktDt0t9C7WFXYZ0Qqbx4FwV3y0/MjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=faELjGLdR/SpxemQyr4+U3uQCoJVcORSwrz+xVWUvth8EJiTABJlgcGU1uLwXljNk2Q8dZU5PBJspRZqvu80ZrLzBgi6YTRX6fuwS1fhnpx7N1N+OJJwwj0nbBPkirpKbk8asVdEVf0GmASImHFpA7aZOIN2bPPcYWncSthEfJk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TjGtYTLU; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TjGtYTLU" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YfsFPnOcbltfq8I/LYPyEFBTp8hIt6U9UoZ8nzClcJE=; b=TjGtYTLU/Q2YOHZ6hpDwoBH6ee1yxQfi+LoWmF8E/Ycr0AWv5Svv7E+oGehD7lEP5rmAdY K1G1QKZWrREUWInfS9O7uqJDXTm/r4Fx1JATJjsynJtXwlTBba6mzA6C/vNgW0qIR8GQdV GwDqI0xITc1ccIa0d7sM70D056KXHbg= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-576-Yq83xA6FM12da0kERHhmJw-1; Thu, 11 Dec 2025 07:18:18 -0500 X-MC-Unique: Yq83xA6FM12da0kERHhmJw-1 X-Mimecast-MFC-AGG-ID: Yq83xA6FM12da0kERHhmJw_1765455497 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6C5A3195DE49; Thu, 11 Dec 2025 12:18:17 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7631E180045B; Thu, 11 Dec 2025 12:18:15 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/18] cifs: Scripted clean up fs/smb/client/dfs_cache.h Date: Thu, 11 Dec 2025 12:17:01 +0000 Message-ID: <20251211121715.759074-9-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/dfs_cache.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/fs/smb/client/dfs_cache.h b/fs/smb/client/dfs_cache.h index 18a08a2ca93b..c99dc3546c70 100644 --- a/fs/smb/client/dfs_cache.h +++ b/fs/smb/client/dfs_cache.h @@ -37,17 +37,22 @@ int dfs_cache_init(void); void dfs_cache_destroy(void); extern const struct proc_ops dfscache_proc_ops; =20 -int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, const str= uct nls_table *cp, - int remap, const char *path, struct dfs_info3_param *ref, +int dfs_cache_find(const unsigned int xid, struct cifs_ses *ses, + const struct nls_table *cp, int remap, const char *path, + struct dfs_info3_param *ref, struct dfs_cache_tgt_list *tgt_list); int dfs_cache_noreq_find(const char *path, struct dfs_info3_param *ref, struct dfs_cache_tgt_list *tgt_list); -void dfs_cache_noreq_update_tgthint(const char *path, const struct dfs_cac= he_tgt_iterator *it); -int dfs_cache_get_tgt_referral(const char *path, const struct dfs_cache_tg= t_iterator *it, +void dfs_cache_noreq_update_tgthint(const char *path, + const struct dfs_cache_tgt_iterator *it); +int dfs_cache_get_tgt_referral(const char *path, + const struct dfs_cache_tgt_iterator *it, struct dfs_info3_param *ref); -int dfs_cache_get_tgt_share(char *path, const struct dfs_cache_tgt_iterato= r *it, char **share, - char **prefix); -char *dfs_cache_canonical_path(const char *path, const struct nls_table *c= p, int remap); +int dfs_cache_get_tgt_share(char *path, + const struct dfs_cache_tgt_iterator *it, + char **share, char **prefix); +char *dfs_cache_canonical_path(const char *path, const struct nls_table *c= p, + int remap); int dfs_cache_remount_fs(struct cifs_sb_info *cifs_sb); void dfs_cache_refresh(struct work_struct *work); From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 6762B2D9482 for ; Thu, 11 Dec 2025 12:18:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455509; cv=none; b=mcQ/dtroB5xn3yWF/aY/oTWdbFmV5z+GDiIMKXUK96qBaiRYvyYgTWgm7ZnPzEUPLw2tsGQSVAGy6VBzurYoJcZfBSHYuaCnql0r5K3iKcYjEoccKjCmAElEfMlWdsmtbbgVgT8VabvPgxkR2n/Ov1/ndkASp1wfchEwvtTJ99k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455509; c=relaxed/simple; bh=o0MayiftDnLIdmHvfSlZ8/ZHloBTKIoCsuSPWWVhOlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FFDfKcVuV7iD67wuWzbxXX4nwnrpP1XFBIcu1Hzd7IDcvTuFAYZ4E+A1+kXqsiAMLort4LqObPK4aRqJ0+8cHUS33FCDFYM3SOuMByxLACn7fPT12Z9Z9+kkUnkjKo+APPfxIOD2YJ9LKjG82lucoyHUJHV+eALvlywlNfCKBp8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=EJyeDFVS; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EJyeDFVS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eFJzJ1e1EZECnAmehQNetdpj4AilrLDU4YxRrL1opts=; b=EJyeDFVSr6JTfNSyvYGEZ8EeDNX45RwpCSk4Fuk6khAxNxKJDIofrLrFh0vxEzeEZZJ3Cc jKGVq7E76KJtV8+eeUeyigZEnMnUbeRlrmjxz6MaH3OrYVyeunlcTkEat6kAUXkZ4vGFcD NLZA6E2pvNfVnxGugypbg5LMr5E2Yfo= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-493-tEk_SZllOkGUWJ-EijuHsQ-1; Thu, 11 Dec 2025 07:18:21 -0500 X-MC-Unique: tEk_SZllOkGUWJ-EijuHsQ-1 X-Mimecast-MFC-AGG-ID: tEk_SZllOkGUWJ-EijuHsQ_1765455500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9457D1800343; Thu, 11 Dec 2025 12:18:20 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AFA3B180045B; Thu, 11 Dec 2025 12:18:18 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/18] cifs: Scripted clean up fs/smb/client/dns_resolve.h Date: Thu, 11 Dec 2025 12:17:02 +0000 Message-ID: <20251211121715.759074-10-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/dns_resolve.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/dns_resolve.h b/fs/smb/client/dns_resolve.h index 36bc4a6a55bf..951fbab5e61d 100644 --- a/fs/smb/client/dns_resolve.h +++ b/fs/smb/client/dns_resolve.h @@ -15,8 +15,8 @@ #include "cifsglob.h" #include "cifsproto.h" =20 -int dns_resolve_name(const char *dom, const char *name, - size_t namelen, struct sockaddr *ip_addr); +int dns_resolve_name(const char *dom, const char *name, size_t namelen, + struct sockaddr *ip_addr); =20 static inline int dns_resolve_unc(const char *dom, const char *unc, struct sockaddr *ip_addr) From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 6689930147D for ; Thu, 11 Dec 2025 12:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455516; cv=none; b=l84Hmwz0HQWGkKXI3beazm0+cci6I7hsJM3R/GPrX7Ts6WysGoVU84fkmKh9mV2Zve1DBpBeGo1iZOdmECUpwsc3iK11kXYt8wbWIKdc2ms7ADRIM7JL4/W8M17u4UrHkzSj+IFWrl1sfDdJJRSW+g0uk5Fxl/yI4zLMlP6X0tU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455516; c=relaxed/simple; bh=V2FIfxbj6NUEd+Pb09ufbOelsQwMm6m90XXQ5nd29xI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNW3JnwKWeG7/L2ORgqtP0xRyqneyWlwylgfZA4erBe0D3sHNbSBfhQuWvX3DEvgYs7KjxuCQDDOFyd2zSICMwJpaMz59IZ1GbFtuPkMGlsOY8HtjQJ2gyojSWnjFQL9UIgZWJVhHYl0m1DI3EtMY0zhLQf1mvv2Uvt5SV5oNUk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JBW1xKel; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JBW1xKel" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hr2Frj82z7mY9fcOShwiQSfQlG9xZaviuZh/z2HfbTQ=; b=JBW1xKel7eUTS4IapYLbmdajg9byo5b7tz7MRJ8FnGfipoLalOI3ZroJFA0ju16gXwLvoJ 6L7FmyCjkVh94CYJ1+u5wrSDWgzwOOsUhVcYdm7nYBTkepTAXcaT061zntfvQYYr9wgrMy Ct0cp2cpPgW4LLg+AqZbwCSGrqj0V70= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549-QPiUMRVqNrC7sWecJh8CrQ-1; Thu, 11 Dec 2025 07:18:25 -0500 X-MC-Unique: QPiUMRVqNrC7sWecJh8CrQ-1 X-Mimecast-MFC-AGG-ID: QPiUMRVqNrC7sWecJh8CrQ_1765455503 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B71C418011EE; Thu, 11 Dec 2025 12:18:23 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 06F0B1953986; Thu, 11 Dec 2025 12:18:21 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/18] cifs: Scripted clean up fs/smb/client/cifsglob.h Date: Thu, 11 Dec 2025 12:17:03 +0000 Message-ID: <20251211121715.759074-11-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifsglob.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 3eca5bfb7030..9cff21fb7266 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -1327,8 +1327,8 @@ struct tcon_link { struct cifs_tcon *tl_tcon; }; =20 -extern struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb); -extern void smb3_free_compound_rqst(int num_rqst, struct smb_rqst *rqst); +struct tcon_link *cifs_sb_tlink(struct cifs_sb_info *cifs_sb); +void smb3_free_compound_rqst(int num_rqst, struct smb_rqst *rqst); =20 static inline struct cifs_tcon * tlink_tcon(struct tcon_link *tlink) @@ -1342,7 +1342,7 @@ cifs_sb_master_tlink(struct cifs_sb_info *cifs_sb) return cifs_sb->master_tlink; } =20 -extern void cifs_put_tlink(struct tcon_link *tlink); +void cifs_put_tlink(struct tcon_link *tlink); =20 static inline struct tcon_link * cifs_get_tlink(struct tcon_link *tlink) @@ -1353,7 +1353,7 @@ cifs_get_tlink(struct tcon_link *tlink) } =20 /* This function is always expected to succeed */ -extern struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb); +struct cifs_tcon *cifs_sb_master_tcon(struct cifs_sb_info *cifs_sb); =20 #define CIFS_OPLOCK_NO_CHANGE 0xfe =20 @@ -1526,8 +1526,8 @@ cifsFileInfo_get_locked(struct cifsFileInfo *cifs_fil= e) } =20 struct cifsFileInfo *cifsFileInfo_get(struct cifsFileInfo *cifs_file); -void _cifsFileInfo_put(struct cifsFileInfo *cifs_file, bool wait_oplock_hd= lr, - bool offload); +void _cifsFileInfo_put(struct cifsFileInfo *cifs_file, + bool wait_oplock_handler, bool offload); void cifsFileInfo_put(struct cifsFileInfo *cifs_file); int cifs_file_flush(const unsigned int xid, struct inode *inode, struct cifsFileInfo *cfile); From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 183022F692A for ; Thu, 11 Dec 2025 12:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455521; cv=none; b=mDeHaZPU6Moign707CV559EWpZyKWIFSBvi4mWb1IuhKRn/TDaN5Yad2R7R6v40K98aABCElbLbNCNc+iP6gIk2A/N0po6ONDY5ZzJiHJYWUbNcC/wv3h4BKy8aowIDzInn/V40Lw5XtegECa2HLmsBIdVjZrqEDZV3j2efNbvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455521; c=relaxed/simple; bh=aMGJMIjJiOADXXebU+uwrRe/0ef/+8RitpzvbOxMdAs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gBi8AB07iT+ygUSA3dhAs3LiSDCojKpfzs1ANb1NmUNgq6lDZEtsPCaM8x0aBjGiMS4HcLbXQUx0srYXBtQ3UHpd61m7zCwSJTI+pXuHIgug7VzBAqUyOYuDgvd+QzRLnhNPSC5/K2imdnpwDUKr72c/T+1LDklQa+pMh6ILks8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=eeggZC3X; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eeggZC3X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8P69wSwkHuwIm/E0nRpCOVrbHf01r0YszPzEpa0kD20=; b=eeggZC3X/jDklBuCa4puEbn2mhxsptxqteYltBEUSXFjnXToQf0N7sI3L1YkzGm8dINhNm /y7KgxLjaCiFKlFzgxd4Vu7RC7VGHNBsecJKjkHbfVbFNgmoTTR71gXr0ActVLGVLjSYhN B7eXyKSJ5S/2TyVzpRvwz3KWmGdeESY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-153-SilGHqA7ORaJd-XyZLxRDQ-1; Thu, 11 Dec 2025 07:18:27 -0500 X-MC-Unique: SilGHqA7ORaJd-XyZLxRDQ-1 X-Mimecast-MFC-AGG-ID: SilGHqA7ORaJd-XyZLxRDQ_1765455506 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 90B1F1956053; Thu, 11 Dec 2025 12:18:26 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D231C19540DF; Thu, 11 Dec 2025 12:18:24 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/18] cifs: Scripted clean up fs/smb/client/fscache.h Date: Thu, 11 Dec 2025 12:17:04 +0000 Message-ID: <20251211121715.759074-12-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/fscache.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/smb/client/fscache.h b/fs/smb/client/fscache.h index f06cb24f5f3c..b6c94db5edb9 100644 --- a/fs/smb/client/fscache.h +++ b/fs/smb/client/fscache.h @@ -38,12 +38,12 @@ struct cifs_fscache_inode_coherency_data { /* * fscache.c */ -extern int cifs_fscache_get_super_cookie(struct cifs_tcon *); -extern void cifs_fscache_release_super_cookie(struct cifs_tcon *); +int cifs_fscache_get_super_cookie(struct cifs_tcon *tcon); +void cifs_fscache_release_super_cookie(struct cifs_tcon *tcon); =20 -extern void cifs_fscache_get_inode_cookie(struct inode *inode); -extern void cifs_fscache_release_inode_cookie(struct inode *); -extern void cifs_fscache_unuse_inode_cookie(struct inode *inode, bool upda= te); +void cifs_fscache_get_inode_cookie(struct inode *inode); +void cifs_fscache_release_inode_cookie(struct inode *inode); +void cifs_fscache_unuse_inode_cookie(struct inode *inode, bool update); =20 static inline void cifs_fscache_fill_coherency(struct inode *inode, From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 3A3E730CDB0 for ; Thu, 11 Dec 2025 12:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455521; cv=none; b=B/d58rPE5o4eyL4Rxlb3kYkuKo6WJ5g/o1L1rUIFcs9PVuakag8Tkmt2cTzIaXwKzpS0Dpnus4/5iu4gSiEelObqU0poX9ZjNmgbQE9//bbqn4I/IlWMZGd5rgvYRikdaoZ3eBLpk1OWCA25HG5nVPkynaZ4xet/S03blIKNBBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455521; c=relaxed/simple; bh=P7JBn444xdvhLpCQepzLQ+EcWrX8dc4C1cRuQSo75Hs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cUuS29GMVFRpPhAp98IlRetTRQKWQR0NJp4XxaO/2NH9fBfvcwT/eboE6BrWnM/leHiHmS1WzBOgpOGEFeW1m+WVFwtMGhpjy50rOEPYV7Te/Kxhr+8sVW523VmtF+e5dbi324jgycebBxE4Xjybr5nl+t20/0BjPKZemF8TaBs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Z4qv3Ram; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Z4qv3Ram" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nDJcnSsXmlBuQK4V1fLhj7UXW9svjBHPVo02fbrc/2w=; b=Z4qv3RamvK6sjxD4p4KGGiwpdv144caoOfLh8RcczR89cwJeAn6Em4MAveusR5ol8rC0D5 BcQ3Jowf2T22nbqjAHuuJBQv8sx27QwutJi9bL+u3+gTijNr/q6AIV4KPLYIuQTiP12YQw bOVnQvuUWvj1hRdI35eXSwFWY3NINdk= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-5y5qNSzAPN2YLCsX7VSBpw-1; Thu, 11 Dec 2025 07:18:30 -0500 X-MC-Unique: 5y5qNSzAPN2YLCsX7VSBpw-1 X-Mimecast-MFC-AGG-ID: 5y5qNSzAPN2YLCsX7VSBpw_1765455509 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8B9EC1956096; Thu, 11 Dec 2025 12:18:29 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D2AA8180049F; Thu, 11 Dec 2025 12:18:27 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/18] cifs: Scripted clean up fs/smb/client/fs_context.h Date: Thu, 11 Dec 2025 12:17:05 +0000 Message-ID: <20251211121715.759074-13-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/fs_context.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fs/smb/client/fs_context.h b/fs/smb/client/fs_context.h index 7af7cbbe4208..49b2a6f09ca2 100644 --- a/fs/smb/client/fs_context.h +++ b/fs/smb/client/fs_context.h @@ -361,18 +361,20 @@ static inline enum cifs_symlink_type cifs_symlink_typ= e(struct cifs_sb_info *cifs return CIFS_SYMLINK_TYPE_NONE; } =20 -extern int smb3_init_fs_context(struct fs_context *fc); -extern void smb3_cleanup_fs_context_contents(struct smb3_fs_context *ctx); -extern void smb3_cleanup_fs_context(struct smb3_fs_context *ctx); +int smb3_init_fs_context(struct fs_context *fc); +void smb3_cleanup_fs_context_contents(struct smb3_fs_context *ctx); +void smb3_cleanup_fs_context(struct smb3_fs_context *ctx); =20 static inline struct smb3_fs_context *smb3_fc2context(const struct fs_cont= ext *fc) { return fc->fs_private; } =20 -extern int smb3_fs_context_dup(struct smb3_fs_context *new_ctx, struct smb= 3_fs_context *ctx); -extern int smb3_sync_session_ctx_passwords(struct cifs_sb_info *cifs_sb, s= truct cifs_ses *ses); -extern void smb3_update_mnt_flags(struct cifs_sb_info *cifs_sb); +int smb3_fs_context_dup(struct smb3_fs_context *new_ctx, + struct smb3_fs_context *ctx); +int smb3_sync_session_ctx_passwords(struct cifs_sb_info *cifs_sb, + struct cifs_ses *ses); +void smb3_update_mnt_flags(struct cifs_sb_info *cifs_sb); =20 /* * max deferred close timeout (jiffies) - 2^30 @@ -380,7 +382,7 @@ extern void smb3_update_mnt_flags(struct cifs_sb_info *= cifs_sb); #define SMB3_MAX_DCLOSETIMEO (1 << 30) #define SMB3_DEF_DCLOSETIMEO (1 * HZ) /* even 1 sec enough to help eg open= /write/close/open/read */ #define MAX_CACHED_FIDS 16 -extern char *cifs_sanitize_prepath(char *prepath, gfp_t gfp); +char *cifs_sanitize_prepath(char *prepath, gfp_t gfp); =20 extern struct mutex cifs_mount_mutex; From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 1FE482DF707 for ; Thu, 11 Dec 2025 12:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455523; cv=none; b=FnmPreyY23mGbHi2FCHyH5NKjFUj9jatzLt0YYThqdH+zwd0r7f45L1Y4+QN/GgFnDaaqJcSTm7L+cJyEx7Zsv/AsIavIvwBurgc7EgYOMyO7vXHhiirS5gqDZ0z3/6052xaerAX7nmCZkEpFQYlQeHxJ3JA7QccilmlNoMh9BU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455523; c=relaxed/simple; bh=zLWO5FyfEzMxfl05ySru/8Ox2dSgrAF7KO5fd5O/Q8M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SxSLS1ebFwNJvUGye6qJZni7FhA8dYWb3UuotF0UBS+qilc+5B8+SxEiwA9EZGHn+iiSntUrRI/9LkBYW7o0az7QfQi0EUB0WPhWzOy6sVonB1yiMkwOweu8LdW0aeQUEFRkcnHyfunYhKzoXYMMVQ1jxLr5TZQ24ZHj5IpMF3I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KYyFisH8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KYyFisH8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qFALeYtPmFkPXwUUj8yBrwfdlJ1QvpuwMDYyDcDX4Lw=; b=KYyFisH8BAlHo91QEieQ4BLQhgXztEypamyxUbiLmlh+86h7A0JArdWGm5gTg7FYtq47rg ZHR1ZHrxhYxcJTzgwzbCM8mm9kfHd1u76J7cf579jZtrfSsulkuz8AXwPB+xNaAXQQ0ueE p9olZry88IGtslwfZ+n2iGbgv32Akbc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-4fR-R_d-OdyWfl5WJ5DfFA-1; Thu, 11 Dec 2025 07:18:33 -0500 X-MC-Unique: 4fR-R_d-OdyWfl5WJ5DfFA-1 X-Mimecast-MFC-AGG-ID: 4fR-R_d-OdyWfl5WJ5DfFA_1765455512 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8635719560AF; Thu, 11 Dec 2025 12:18:32 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C02F61956056; Thu, 11 Dec 2025 12:18:30 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/18] cifs: Scripted clean up fs/smb/client/cifs_spnego.h Date: Thu, 11 Dec 2025 12:17:06 +0000 Message-ID: <20251211121715.759074-14-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifs_spnego.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/cifs_spnego.h b/fs/smb/client/cifs_spnego.h index e70929db3611..987768348624 100644 --- a/fs/smb/client/cifs_spnego.h +++ b/fs/smb/client/cifs_spnego.h @@ -28,7 +28,7 @@ struct cifs_spnego_msg { }; =20 extern struct key_type cifs_spnego_key_type; -extern struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo, - struct TCP_Server_Info *server); +struct key *cifs_get_spnego_key(struct cifs_ses *sesInfo, + struct TCP_Server_Info *server); =20 #endif /* _CIFS_SPNEGO_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C1E3930DEA4 for ; Thu, 11 Dec 2025 12:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455523; cv=none; b=l/sU9WQUpIW0DmkVMKjWXoh478mos+tGphVLjsx1tSGm5TTCw2Es0wpimLP2WeKK7zQefsMtL07tdwki8jAjT5W+P/ojAoGaSLdk9MXYuH/8g/YSUeNAKuCv3FTGQl9GhlBUNL/QVScCVxsAsnwoHOtxAiA7C/G4r9ZBRxAZO7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455523; c=relaxed/simple; bh=RwYUerJ4hJmzwuH1LlZyqEcdJj9Pt2Fovq5QE2M9JM8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HvWkCG9EkNR+yqaCLYV7ZZyxQBM2CRM68grXmodAOTTrRsRZN2T/+24pfp/chbm5KmCVTZf/YpuAgFXgUbkcOsohQOEXg5wuGAIYYj3rHGh+ID6qEeERGqVuOEFbkboPGU34jTicOsYQ+uBevo/uvAOQeZkXXxtG0Bmm1abzuuc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GT8A0Ket; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GT8A0Ket" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vfVyyD1PexB1d/N6d8HS6nBZO+yvtrhFLe6ajtg+Ako=; b=GT8A0KetiP00P4u9nHjooeJVpqyx4+LkIcCGaMeo4G095jdJ+vMg+H9z2YqxG3RIr6k2hX nLnZRUzaKqFT7sgFTnPFle8pgd6jWPBCNyh4yQxyXjcWSHBZJFURZXmlyvqxXgpO3EzEji yjMvwXf94fqz11MaJMocPkc8Ck/7/54= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-13-qWgjAMYnNKi2LJjyakcflg-1; Thu, 11 Dec 2025 07:18:36 -0500 X-MC-Unique: qWgjAMYnNKi2LJjyakcflg-1 X-Mimecast-MFC-AGG-ID: qWgjAMYnNKi2LJjyakcflg_1765455515 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A8B57195FCDC; Thu, 11 Dec 2025 12:18:35 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E0E24180035F; Thu, 11 Dec 2025 12:18:33 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/18] cifs: Scripted clean up fs/smb/client/compress.h Date: Thu, 11 Dec 2025 12:17:07 +0000 Message-ID: <20251211121715.759074-15-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/compress.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/compress.h b/fs/smb/client/compress.h index 63aea32fbe92..2679baca129b 100644 --- a/fs/smb/client/compress.h +++ b/fs/smb/client/compress.h @@ -30,7 +30,8 @@ typedef int (*compress_send_fn)(struct TCP_Server_Info *, int, struct smb_= rqst *); =20 =20 -int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq, comp= ress_send_fn send_fn); +int smb_compress(struct TCP_Server_Info *server, struct smb_rqst *rq, + compress_send_fn send_fn); bool should_compress(const struct cifs_tcon *tcon, const struct smb_rqst *= rq); =20 /* From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 243E62E2665 for ; Thu, 11 Dec 2025 12:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455533; cv=none; b=CBD/4LKe/+i4pgyFBiLsWy/Pt2rjmCVXBYZd0rr+muBb6j17dGoz/gf7DmYs5+BATnOAn664fCD1zJh2nO1uTKBytzoZAOewWvnJc19SmrMw8wRIAg78z9NvJCnPDGC4mU4FqOLf8jfJHraM9bv6a/71gIdOJK5DgXO9sz8E0lI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455533; c=relaxed/simple; bh=+Wo+l71IAU0AqaO6ZoV2OG/pvIDGGYqR2GhGhU27Y68=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PijCJLNP2HBz1MUpfPE98TvrBgtg+C5p9qCaQJFoW73sQdFkHReI5aYWf2nOOpmZyuYdQeZZrk5L7jALrUjKtBrIuHMWO415s2W1KpQ6v8MyvVAl7kq+8BOS33jWkW8LIfAWCUQtNShjf/l/udwC0xuYxf3vVfe9DY2eXVC8p7c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fwTjA+sl; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fwTjA+sl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U+sZRfUhZLYVTFCknqCPjwaISkbiMEC9lHaFs7CeHiY=; b=fwTjA+sloccFX6sTKin+LDWjwJEhvUE1x6zZ7/68s7z6hTMIISiwxe6ch12qn3lBAG9vKG GBL3ynGeUDFjgyrMFf/U+HqmN4xYFaQNFHE92HzSit/UVfpUQQ3BJSJwtLiHYypFmR2Ib8 B4goAocOT3tU5KH8rXH4kkHMS3ib5W4= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-392-kz4gVK2sNH-hU3h-RKxHCQ-1; Thu, 11 Dec 2025 07:18:39 -0500 X-MC-Unique: kz4gVK2sNH-hU3h-RKxHCQ-1 X-Mimecast-MFC-AGG-ID: kz4gVK2sNH-hU3h-RKxHCQ_1765455518 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 968F119560A5; Thu, 11 Dec 2025 12:18:38 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D93F0180049F; Thu, 11 Dec 2025 12:18:36 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/18] cifs: Scripted clean up fs/smb/client/cifs_swn.h Date: Thu, 11 Dec 2025 12:17:08 +0000 Message-ID: <20251211121715.759074-16-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifs_swn.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/smb/client/cifs_swn.h b/fs/smb/client/cifs_swn.h index 8a9d2a5c9077..955d07b69450 100644 --- a/fs/smb/client/cifs_swn.h +++ b/fs/smb/client/cifs_swn.h @@ -14,15 +14,15 @@ struct sk_buff; struct genl_info; =20 #ifdef CONFIG_CIFS_SWN_UPCALL -extern int cifs_swn_register(struct cifs_tcon *tcon); +int cifs_swn_register(struct cifs_tcon *tcon); =20 -extern int cifs_swn_unregister(struct cifs_tcon *tcon); +int cifs_swn_unregister(struct cifs_tcon *tcon); =20 -extern int cifs_swn_notify(struct sk_buff *skb, struct genl_info *info); +int cifs_swn_notify(struct sk_buff *skb, struct genl_info *info); =20 -extern void cifs_swn_dump(struct seq_file *m); +void cifs_swn_dump(struct seq_file *m); =20 -extern void cifs_swn_check(void); +void cifs_swn_check(void); =20 static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *ser= ver) { From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 B369F30F7EA for ; Thu, 11 Dec 2025 12:18:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455533; cv=none; b=PuseNS5GdOM+AP13DCG1efR2n9t+6EWXhiWWUvfnq/ULMVS9Dx9shsNkAo8+5zkhnxGHvdhdAmUmYymOgxkVnjkHwb37Cj2y8UCTMZBOIWeZXCnjxD9agF2ipO7e4iOxsOghiNdo0qF4WvxSCs7WMDnuuCYv7rycKiUtCmgknC4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455533; c=relaxed/simple; bh=kHsDSsBbEJjgzmCquEl2lb6YJgpKoKwc0ROqUXOGtwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZPNlfqK7Cu4e6MSGaxsQaGdSSaBMXBuU2TvpdcSbMiSYn6Yc9OGxn+WN3rnwMPHZT4DTsTnBMH7UfJBVuX5fvrf+6mwc2wwKLCFvUs6fwR60bqL+HhbOSAVztbZxE9STaAzRGNi8j0/6uuyrkmoV+zUpeFTVids1vml2jokZJrw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OaHaHRLF; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OaHaHRLF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uzr6N7b5JybtHCAVwGJNHrVs+Vz79HR5PooQE+V9Huo=; b=OaHaHRLFJp2O6c3nY1Sbrz+9gPIB7620aHtlw+IAEoi2TG5W8oeIQsihnkGEVa0sLlA58z LAJCIeEGOp81m9QqpPl8mEPWw6/oiDMKTzqfTI1YREoE/KBpkn1DJSDo8m7t4rq/uvn9rg 4kRoTtpM1E0R9JNfcxwtU55L3amV8d8= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-256-V4OYB4LeOZyTvdbitEz3wQ-1; Thu, 11 Dec 2025 07:18:42 -0500 X-MC-Unique: V4OYB4LeOZyTvdbitEz3wQ-1 X-Mimecast-MFC-AGG-ID: V4OYB4LeOZyTvdbitEz3wQ_1765455521 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9F6511800592; Thu, 11 Dec 2025 12:18:41 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D9F861956056; Thu, 11 Dec 2025 12:18:39 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/18] cifs: Scripted clean up fs/smb/client/cifs_debug.h Date: Thu, 11 Dec 2025 12:17:09 +0000 Message-ID: <20251211121715.759074-17-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/cifs_debug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/smb/client/cifs_debug.h b/fs/smb/client/cifs_debug.h index e0035ff42dba..35bd5c8e1d71 100644 --- a/fs/smb/client/cifs_debug.h +++ b/fs/smb/client/cifs_debug.h @@ -15,7 +15,8 @@ #define pr_fmt(fmt) "CIFS: " fmt =20 void cifs_dump_mem(char *label, void *data, int length); -void cifs_dump_detail(void *buf, size_t buf_len, struct TCP_Server_Info *s= erver); +void cifs_dump_detail(void *buf, size_t buf_len, + struct TCP_Server_Info *server); void cifs_dump_mids(struct TCP_Server_Info *server); extern bool traceSMB; /* flag which enables the function below */ void dump_smb(void *buf, int smb_buf_length); From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 635A830FC1D for ; Thu, 11 Dec 2025 12:18:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455536; cv=none; b=szJxbGO33JePVupadFw6NX1YZwjEFNTtb7Mafa0dSDRboc+grgSdEyU4XA0+oKAUiFwRaEEgSCu9gzgkoPDccuvk3OqOIldzMqQW0FwOetLNq8ehxfWPei3WnrDC+pp7pEj2/UyUj8JedzVdVcwuORlxkqvGki/pJiyvetBmMfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455536; c=relaxed/simple; bh=ytoBwTGdw1pZ3mpFGzdBmDI44ONKUMSqHMIc+9O4iHQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s8t9J0DdjKE5r9Eqiig/0oyCwJ1D6ymjPbb2wUtAYQs46VPBjjgm5sIuBahgfFC+8NgVvXob/7RskKYBppJq0BXrMsR55enmacvUSYJqvV+GciaTqZolp7wSgck4sZBV2DVtKnOOmgK0NhALLfcjpkmrdd9IYJKBiyEYN5V3nYc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=e+iX22w4; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="e+iX22w4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OFuO3WztJTPasz8cQaqOaz1zmSpdViB4uluLBvaXFdM=; b=e+iX22w4nmn5jMSs2C34YF7+JZeG5TE8Q0SrEnY0Bh5ZgRWojo0XdKJWPdeC5sE4FeTC7+ 6ja9OA7BX5boGdrSsKpw/8+Uy1q8dZCbiVj9Q7NLuXMBhB8p25xhcrw3+dTBrFj0DvmOd6 SGYyTbcq3sJrjeQVykBW9pGjFoRHdcY= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-TgD5CY98P36hNatxu17d7g-1; Thu, 11 Dec 2025 07:18:46 -0500 X-MC-Unique: TgD5CY98P36hNatxu17d7g-1 X-Mimecast-MFC-AGG-ID: TgD5CY98P36hNatxu17d7g_1765455524 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D03C318009C2; Thu, 11 Dec 2025 12:18:44 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D15A1180049F; Thu, 11 Dec 2025 12:18:42 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/18] cifs: Scripted clean up fs/smb/client/smb2proto.h Date: Thu, 11 Dec 2025 12:17:10 +0000 Message-ID: <20251211121715.759074-18-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/smb2proto.h | 468 ++++++++++++++++++-------------------- 1 file changed, 216 insertions(+), 252 deletions(-) diff --git a/fs/smb/client/smb2proto.h b/fs/smb/client/smb2proto.h index 063c9f83bbcd..abd62cb2cecd 100644 --- a/fs/smb/client/smb2proto.h +++ b/fs/smb/client/smb2proto.h @@ -22,287 +22,251 @@ struct smb_rqst; * All Prototypes ***************************************************************** */ -extern int map_smb2_to_linux_error(char *buf, bool log_err); -extern int smb2_check_message(char *buf, unsigned int pdu_len, unsigned in= t length, - struct TCP_Server_Info *server); -extern unsigned int smb2_calc_size(void *buf); -extern char *smb2_get_data_area_len(int *off, int *len, - struct smb2_hdr *shdr); -extern __le16 *cifs_convert_path_to_utf16(const char *from, - struct cifs_sb_info *cifs_sb); +int map_smb2_to_linux_error(char *buf, bool log_err); +int smb2_check_message(char *buf, unsigned int pdu_len, unsigned int len, + struct TCP_Server_Info *server); +unsigned int smb2_calc_size(void *buf); +char *smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *shdr); +__le16 *cifs_convert_path_to_utf16(const char *from, + struct cifs_sb_info *cifs_sb); =20 -extern int smb2_verify_signature(struct smb_rqst *, struct TCP_Server_Info= *); -extern int smb2_check_receive(struct mid_q_entry *mid, - struct TCP_Server_Info *server, bool log_error); -extern struct mid_q_entry *smb2_setup_request(struct cifs_ses *ses, - struct TCP_Server_Info *, - struct smb_rqst *rqst); -extern struct mid_q_entry *smb2_setup_async_request( - struct TCP_Server_Info *server, struct smb_rqst *rqst); -extern struct cifs_tcon *smb2_find_smb_tcon(struct TCP_Server_Info *server, - __u64 ses_id, __u32 tid); -extern __le32 smb2_get_lease_state(struct cifsInodeInfo *cinode); -extern bool smb2_is_valid_oplock_break(char *buffer, - struct TCP_Server_Info *srv); -extern int smb3_handle_read_data(struct TCP_Server_Info *server, - struct mid_q_entry *mid); +int smb2_verify_signature(struct smb_rqst *rqst, + struct TCP_Server_Info *server); +int smb2_check_receive(struct mid_q_entry *mid, struct TCP_Server_Info *se= rver, + bool log_error); +struct mid_q_entry *smb2_setup_request(struct cifs_ses *ses, + struct TCP_Server_Info *server, + struct smb_rqst *rqst); +struct mid_q_entry *smb2_setup_async_request(struct TCP_Server_Info *serve= r, + struct smb_rqst *rqst); +struct cifs_tcon *smb2_find_smb_tcon(struct TCP_Server_Info *server, + __u64 ses_id, __u32 tid); +__le32 smb2_get_lease_state(struct cifsInodeInfo *cinode); +bool smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *serv= er); +int smb3_handle_read_data(struct TCP_Server_Info *server, + struct mid_q_entry *mid); struct inode *smb2_create_reparse_inode(struct cifs_open_info_data *data, - struct super_block *sb, - const unsigned int xid, - struct cifs_tcon *tcon, - const char *full_path, - bool directory, - struct kvec *reparse_iov, - struct kvec *xattr_iov); -int smb2_query_reparse_point(const unsigned int xid, - struct cifs_tcon *tcon, + struct super_block *sb, + const unsigned int xid, + struct cifs_tcon *tcon, + const char *full_path, bool directory, + struct kvec *reparse_iov, + struct kvec *xattr_iov); +int smb2_query_reparse_point(const unsigned int xid, struct cifs_tcon *tco= n, struct cifs_sb_info *cifs_sb, - const char *full_path, - u32 *tag, struct kvec *rsp, + const char *full_path, u32 *tag, struct kvec *rsp, int *rsp_buftype); -int smb2_query_path_info(const unsigned int xid, - struct cifs_tcon *tcon, - struct cifs_sb_info *cifs_sb, - const char *full_path, +int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, + struct cifs_sb_info *cifs_sb, const char *full_path, struct cifs_open_info_data *data); -extern int smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tc= on, - const char *full_path, __u64 size, - struct cifs_sb_info *cifs_sb, bool set_alloc, - struct dentry *dentry); -extern int smb2_set_file_info(struct inode *inode, const char *full_path, - FILE_BASIC_INFO *buf, const unsigned int xid); -extern int smb311_posix_mkdir(const unsigned int xid, struct inode *inode, - umode_t mode, struct cifs_tcon *tcon, - const char *full_path, - struct cifs_sb_info *cifs_sb); -extern int smb2_mkdir(const unsigned int xid, struct inode *inode, - umode_t mode, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb); -extern void smb2_mkdir_setinfo(struct inode *inode, const char *full_path, - struct cifs_sb_info *cifs_sb, - struct cifs_tcon *tcon, const unsigned int xid); -extern int smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb); -extern int smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, - const char *name, struct cifs_sb_info *cifs_sb, - struct dentry *dentry); -int smb2_rename_path(const unsigned int xid, - struct cifs_tcon *tcon, - struct dentry *source_dentry, - const char *from_name, const char *to_name, - struct cifs_sb_info *cifs_sb); -int smb2_create_hardlink(const unsigned int xid, - struct cifs_tcon *tcon, - struct dentry *source_dentry, - const char *from_name, const char *to_name, - struct cifs_sb_info *cifs_sb); -extern int smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, - struct cifs_sb_info *cifs_sb, const unsigned char *path, - char *pbuf, unsigned int *pbytes_written); -extern int smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, +int smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon, + const char *full_path, __u64 size, + struct cifs_sb_info *cifs_sb, bool set_alloc, + struct dentry *dentry); +int smb2_set_file_info(struct inode *inode, const char *full_path, + FILE_BASIC_INFO *buf, const unsigned int xid); +int smb311_posix_mkdir(const unsigned int xid, struct inode *inode, + umode_t mode, struct cifs_tcon *tcon, + const char *full_path, struct cifs_sb_info *cifs_sb); +int smb2_mkdir(const unsigned int xid, struct inode *parent_inode, + umode_t mode, struct cifs_tcon *tcon, const char *name, + struct cifs_sb_info *cifs_sb); +void smb2_mkdir_setinfo(struct inode *inode, const char *name, + struct cifs_sb_info *cifs_sb, struct cifs_tcon *tcon, + const unsigned int xid); +int smb2_rmdir(const unsigned int xid, struct cifs_tcon *tcon, + const char *name, struct cifs_sb_info *cifs_sb); +int smb2_unlink(const unsigned int xid, struct cifs_tcon *tcon, + const char *name, struct cifs_sb_info *cifs_sb, + struct dentry *dentry); +int smb2_rename_path(const unsigned int xid, struct cifs_tcon *tcon, + struct dentry *source_dentry, const char *from_name, + const char *to_name, struct cifs_sb_info *cifs_sb); +int smb2_create_hardlink(const unsigned int xid, struct cifs_tcon *tcon, + struct dentry *source_dentry, const char *from_name, + const char *to_name, struct cifs_sb_info *cifs_sb); +int smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, + struct cifs_sb_info *cifs_sb, + const unsigned char *path, char *pbuf, + unsigned int *pbytes_written); +int smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, const unsigned char *path, char *pbuf, unsigned int *pbytes_read); -int smb2_fix_symlink_target_type(char **target, bool directory, struct cif= s_sb_info *cifs_sb); +int smb2_fix_symlink_target_type(char **target, bool directory, + struct cifs_sb_info *cifs_sb); int smb2_parse_native_symlink(char **target, const char *buf, unsigned int= len, - bool relative, - const char *full_path, + bool relative, const char *full_path, struct cifs_sb_info *cifs_sb); int smb2_parse_symlink_response(struct cifs_sb_info *cifs_sb, - const struct kvec *iov, - const char *full_path, + const struct kvec *iov, const char *full_path, char **path); -int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,= __u32 *oplock, - void *buf); -extern int smb2_unlock_range(struct cifsFileInfo *cfile, - struct file_lock *flock, const unsigned int xid); -extern int smb2_push_mandatory_locks(struct cifsFileInfo *cfile); -extern void smb2_reconnect_server(struct work_struct *work); -extern int smb3_crypto_aead_allocate(struct TCP_Server_Info *server); -extern unsigned long smb_rqst_len(struct TCP_Server_Info *server, - struct smb_rqst *rqst); -extern void smb2_set_next_command(struct cifs_tcon *tcon, - struct smb_rqst *rqst); -extern void smb2_set_related(struct smb_rqst *rqst); -extern void smb2_set_replay(struct TCP_Server_Info *server, - struct smb_rqst *rqst); -extern bool smb2_should_replay(struct cifs_tcon *tcon, - int *pretries, - int *pcur_sleep); +int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, + __u32 *oplock, void *buf); +int smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock, + const unsigned int xid); +int smb2_push_mandatory_locks(struct cifsFileInfo *cfile); +void smb2_reconnect_server(struct work_struct *work); +int smb3_crypto_aead_allocate(struct TCP_Server_Info *server); +unsigned long smb_rqst_len(struct TCP_Server_Info *server, + struct smb_rqst *rqst); +void smb2_set_next_command(struct cifs_tcon *tcon, struct smb_rqst *rqst); +void smb2_set_related(struct smb_rqst *rqst); +void smb2_set_replay(struct TCP_Server_Info *server, struct smb_rqst *rqst= ); +bool smb2_should_replay(struct cifs_tcon *tcon, int *pretries, + int *pcur_sleep); =20 /* * SMB2 Worker functions - most of protocol specific implementation details * are contained within these calls. */ -extern int SMB2_negotiate(const unsigned int xid, - struct cifs_ses *ses, - struct TCP_Server_Info *server); -extern int SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, - struct TCP_Server_Info *server, - const struct nls_table *nls_cp); -extern int SMB2_logoff(const unsigned int xid, struct cifs_ses *ses); -extern int SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, - const char *tree, struct cifs_tcon *tcon, - const struct nls_table *); -extern int SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon); -extern int SMB2_open(const unsigned int xid, struct cifs_open_parms *oparm= s, - __le16 *path, __u8 *oplock, - struct smb2_file_all_info *buf, - struct create_posix_rsp *posix, - struct kvec *err_iov, int *resp_buftype); -extern int SMB2_open_init(struct cifs_tcon *tcon, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, - __u8 *oplock, struct cifs_open_parms *oparms, - __le16 *path); -extern void SMB2_open_free(struct smb_rqst *rqst); -extern int SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_fid, u64 volatile_fid, u32 opcode, - char *in_data, u32 indatalen, u32 maxoutlen, - char **out_data, u32 *plen /* returned data len */); -extern int SMB2_ioctl_init(struct cifs_tcon *tcon, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, - u64 persistent_fid, u64 volatile_fid, u32 opcode, - char *in_data, u32 indatalen, - __u32 max_response_size); -extern void SMB2_ioctl_free(struct smb_rqst *rqst); -extern int SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tc= on, - u64 persistent_fid, u64 volatile_fid, bool watch_tree, - u32 completion_filter, u32 max_out_data_len, - char **out_data, u32 *plen /* returned data len */); +int SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server); +int SMB2_sess_setup(const unsigned int xid, struct cifs_ses *ses, + struct TCP_Server_Info *server, + const struct nls_table *nls_cp); +int SMB2_logoff(const unsigned int xid, struct cifs_ses *ses); +int SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tr= ee, + struct cifs_tcon *tcon, const struct nls_table *cp); +int SMB2_tdis(const unsigned int xid, struct cifs_tcon *tcon); +int SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, + __le16 *path, __u8 *oplock, struct smb2_file_all_info *buf, + struct create_posix_rsp *posix, struct kvec *err_iov, + int *buftype); +int SMB2_open_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, + struct smb_rqst *rqst, __u8 *oplock, + struct cifs_open_parms *oparms, __le16 *path); +void SMB2_open_free(struct smb_rqst *rqst); +int SMB2_ioctl(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, u32 opcode, char *in_data, + u32 indatalen, u32 max_out_data_len, char **out_data, + u32 *plen /* returned data len */); +int SMB2_ioctl_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, + struct smb_rqst *rqst, u64 persistent_fid, + u64 volatile_fid, u32 opcode, char *in_data, u32 indatalen, + __u32 max_response_size); +void SMB2_ioctl_free(struct smb_rqst *rqst); +int SMB2_change_notify(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, bool watch_tree, + u32 completion_filter, u32 max_out_data_len, + char **out_data, u32 *plen /* returned data len */); =20 -extern int __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_fid, u64 volatile_fid, - struct smb2_file_network_open_info *pbuf); -extern int SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_file_id, u64 volatile_file_id); -extern int SMB2_close_init(struct cifs_tcon *tcon, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, - u64 persistent_fid, u64 volatile_fid, - bool query_attrs); -extern void SMB2_close_free(struct smb_rqst *rqst); -extern int SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_file_id, u64 volatile_file_id); -extern int SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst, - struct cifs_tcon *tcon, - struct TCP_Server_Info *server, - u64 persistent_file_id, u64 volatile_file_id); -extern void SMB2_flush_free(struct smb_rqst *rqst); -extern int SMB311_posix_query_info(const unsigned int xid, struct cifs_tco= n *tcon, - u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u= 32 *plen); -extern int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_file_id, u64 volatile_file_id, - struct smb2_file_all_info *data); -extern int SMB2_query_info_init(struct cifs_tcon *tcon, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, - u64 persistent_fid, u64 volatile_fid, - u8 info_class, u8 info_type, - u32 additional_info, size_t output_len, - size_t input_len, void *input); -extern void SMB2_query_info_free(struct smb_rqst *rqst); -extern int SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_file_id, u64 volatile_file_id, - void **data, unsigned int *plen, u32 info); -extern int SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, +int __SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, + struct smb2_file_network_open_info *pbuf); +int SMB2_close(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid); +int SMB2_close_init(struct cifs_tcon *tcon, struct TCP_Server_Info *server, + struct smb_rqst *rqst, u64 persistent_fid, + u64 volatile_fid, bool query_attrs); +void SMB2_close_free(struct smb_rqst *rqst); +int SMB2_flush(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid); +int SMB2_flush_init(const unsigned int xid, struct smb_rqst *rqst, + struct cifs_tcon *tcon, struct TCP_Server_Info *server, + u64 persistent_fid, u64 volatile_fid); +void SMB2_flush_free(struct smb_rqst *rqst); +int SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon, u64 persistent_fid, u64 volatile_fid, - __le64 *uniqueid); -extern int smb2_async_readv(struct cifs_io_subrequest *rdata); -extern int SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parm= s, - unsigned int *nbytes, char **buf, int *buf_type); -extern void smb2_async_writev(struct cifs_io_subrequest *wdata); -extern int SMB2_write(const unsigned int xid, struct cifs_io_parms *io_par= ms, - unsigned int *nbytes, struct kvec *iov, int n_vec); -extern int SMB2_echo(struct TCP_Server_Info *server); -extern int SMB2_query_directory(const unsigned int xid, struct cifs_tcon *= tcon, - u64 persistent_fid, u64 volatile_fid, int index, - struct cifs_search_info *srch_inf); -extern int SMB2_query_directory_init(unsigned int xid, struct cifs_tcon *t= con, - struct TCP_Server_Info *server, - struct smb_rqst *rqst, - u64 persistent_fid, u64 volatile_fid, - int index, int info_level); -extern void SMB2_query_directory_free(struct smb_rqst *rqst); -extern int SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_fid, u64 volatile_fid, u32 pid, - loff_t new_eof); -extern int SMB2_set_info_init(struct cifs_tcon *tcon, + struct smb311_posix_qinfo *data, u32 *plen); +int SMB2_query_info(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, + struct smb2_file_all_info *data); +int SMB2_query_info_init(struct cifs_tcon *tcon, + struct TCP_Server_Info *server, struct smb_rqst *rqst, + u64 persistent_fid, u64 volatile_fid, u8 info_class, + u8 info_type, u32 additional_info, size_t output_len, + size_t input_len, void *input); +void SMB2_query_info_free(struct smb_rqst *rqst); +int SMB2_query_acl(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, void **data, + u32 *plen, u32 extra_info); +int SMB2_get_srv_num(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, __le64 *uniqueid); +int smb2_async_readv(struct cifs_io_subrequest *rdata); +int SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms, + unsigned int *nbytes, char **buf, int *buf_type); +void smb2_async_writev(struct cifs_io_subrequest *wdata); +int SMB2_write(const unsigned int xid, struct cifs_io_parms *io_parms, + unsigned int *nbytes, struct kvec *iov, int n_vec); +int SMB2_echo(struct TCP_Server_Info *server); +int SMB2_query_directory(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, int index, + struct cifs_search_info *srch_inf); +int SMB2_query_directory_init(const unsigned int xid, struct cifs_tcon *tc= on, struct TCP_Server_Info *server, - struct smb_rqst *rqst, - u64 persistent_fid, u64 volatile_fid, u32 pid, - u8 info_class, u8 info_type, u32 additional_info, - void **data, unsigned int *size); -extern void SMB2_set_info_free(struct smb_rqst *rqst); -extern int SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_fid, u64 volatile_fid, - struct smb_ntsd *pnntsd, int pacllen, int aclflag); -extern int SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_fid, u64 volatile_fid, - struct smb2_file_full_ea_info *buf, int len); -extern int SMB2_set_compression(const unsigned int xid, struct cifs_tcon *= tcon, - u64 persistent_fid, u64 volatile_fid); -extern int SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tco= n, - const u64 persistent_fid, const u64 volatile_fid, - const __u8 oplock_level); -extern int smb2_handle_cancelled_close(struct cifs_tcon *tcon, - __u64 persistent_fid, - __u64 volatile_fid); -extern int smb2_handle_cancelled_mid(struct mid_q_entry *mid, struct TCP_S= erver_Info *server); + struct smb_rqst *rqst, u64 persistent_fid, + u64 volatile_fid, int index, int info_level); +void SMB2_query_directory_free(struct smb_rqst *rqst); +int SMB2_set_eof(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, u32 pid, + loff_t new_eof); +int SMB2_set_info_init(struct cifs_tcon *tcon, struct TCP_Server_Info *ser= ver, + struct smb_rqst *rqst, u64 persistent_fid, + u64 volatile_fid, u32 pid, u8 info_class, u8 info_type, + u32 additional_info, void **data, unsigned int *size); +void SMB2_set_info_free(struct smb_rqst *rqst); +int SMB2_set_acl(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, struct smb_ntsd *pnntsd, + int pacllen, int aclflag); +int SMB2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, + struct smb2_file_full_ea_info *buf, int len); +int SMB2_set_compression(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid); +int SMB2_oplock_break(const unsigned int xid, struct cifs_tcon *tcon, + const u64 persistent_fid, const u64 volatile_fid, + __u8 oplock_level); +int smb2_handle_cancelled_close(struct cifs_tcon *tcon, __u64 persistent_f= id, + __u64 volatile_fid); +int smb2_handle_cancelled_mid(struct mid_q_entry *mid, + struct TCP_Server_Info *server); void smb2_cancelled_close_fid(struct work_struct *work); -extern int SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon = *tcon, - u64 persistent_file_id, u64 volatile_file_id, - struct kstatfs *FSData); -extern int SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, - u64 persistent_file_id, u64 volatile_file_id, int lvl); -extern int SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, - const __u64 persist_fid, const __u64 volatile_fid, - const __u32 pid, const __u64 length, const __u64 offset, - const __u32 lockFlags, const bool wait); -extern int smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, - const __u64 persist_fid, const __u64 volatile_fid, - const __u32 pid, const __u32 num_lock, - struct smb2_lock_element *buf); -extern int SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, - __u8 *lease_key, const __le32 lease_state); -extern int smb3_validate_negotiate(const unsigned int, struct cifs_tcon *); +int SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, + struct kstatfs *fsdata); +int SMB2_QFS_attr(const unsigned int xid, struct cifs_tcon *tcon, + u64 persistent_fid, u64 volatile_fid, int level); +int SMB2_lock(const unsigned int xid, struct cifs_tcon *tcon, + const __u64 persist_fid, const __u64 volatile_fid, + const __u32 pid, const __u64 length, const __u64 offset, + const __u32 lock_flags, const bool wait); +int smb2_lockv(const unsigned int xid, struct cifs_tcon *tcon, + const __u64 persist_fid, const __u64 volatile_fid, + const __u32 pid, const __u32 num_lock, + struct smb2_lock_element *buf); +int SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon, + __u8 *lease_key, const __le32 lease_state); +int smb3_validate_negotiate(const unsigned int xid, struct cifs_tcon *tcon= ); =20 -extern enum securityEnum smb2_select_sectype(struct TCP_Server_Info *, - enum securityEnum); -int smb2_parse_contexts(struct TCP_Server_Info *server, - struct kvec *rsp_iov, - __u16 *epoch, - char *lease_key, __u8 *oplock, +enum securityEnum smb2_select_sectype(struct TCP_Server_Info *server, + enum securityEnum requested); +int smb2_parse_contexts(struct TCP_Server_Info *server, struct kvec *rsp_i= ov, + __u16 *epoch, char *lease_key, __u8 *oplock, struct smb2_file_all_info *buf, struct create_posix_rsp *posix); =20 -extern int smb3_encryption_required(const struct cifs_tcon *tcon); -extern int smb2_validate_iov(unsigned int offset, unsigned int buffer_leng= th, - struct kvec *iov, unsigned int min_buf_size); -extern int smb2_validate_and_copy_iov(unsigned int offset, - unsigned int buffer_length, - struct kvec *iov, - unsigned int minbufsize, char *data); -extern void smb2_copy_fs_info_to_kstatfs( - struct smb2_fs_full_size_info *pfs_inf, - struct kstatfs *kst); -extern int smb3_crypto_shash_allocate(struct TCP_Server_Info *server); -extern void smb311_update_preauth_hash(struct cifs_ses *ses, - struct TCP_Server_Info *server, - struct kvec *iov, int nvec); -extern int smb2_query_info_compound(const unsigned int xid, - struct cifs_tcon *tcon, - const char *path, u32 desired_access, - u32 class, u32 type, u32 output_len, - struct kvec *rsp, int *buftype, - struct cifs_sb_info *cifs_sb); +int smb3_encryption_required(const struct cifs_tcon *tcon); +int smb2_validate_iov(unsigned int offset, unsigned int buffer_length, + struct kvec *iov, unsigned int min_buf_size); +int smb2_validate_and_copy_iov(unsigned int offset, unsigned int buffer_le= ngth, + struct kvec *iov, unsigned int minbufsize, + char *data); +void smb2_copy_fs_info_to_kstatfs(struct smb2_fs_full_size_info *pfs_inf, + struct kstatfs *kst); +int smb3_crypto_shash_allocate(struct TCP_Server_Info *server); +void smb311_update_preauth_hash(struct cifs_ses *ses, + struct TCP_Server_Info *server, + struct kvec *iov, int nvec); +int smb2_query_info_compound(const unsigned int xid, struct cifs_tcon *tco= n, + const char *path, u32 desired_access, u32 class, + u32 type, u32 output_len, struct kvec *rsp, + int *buftype, struct cifs_sb_info *cifs_sb); /* query path info from the server using SMB311 POSIX extensions*/ int posix_info_parse(const void *beg, const void *end, struct smb2_posix_info_parsed *out); int posix_info_sid_size(const void *beg, const void *end); -int smb2_rename_pending_delete(const char *full_path, - struct dentry *dentry, +int smb2_rename_pending_delete(const char *full_path, struct dentry *dentr= y, const unsigned int xid); =20 #endif /* _SMB2PROTO_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 BD1C1310777 for ; Thu, 11 Dec 2025 12:18:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455540; cv=none; b=mbBWI6Sv+c9sZudffhTTzqmwGr1XJhuKsrp88k6z+eZBf8CS+zG2q00vmqXai9ucFz8Gzalg6TeExt3BI5hPUVxWQE7B8HsK89ukLQ0lIp7uwRY7A1brW8N47u5YXx/n4qzJ1UArY4C9wFk5fdFuPouNuDdbz095AwKHEWTPQmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455540; c=relaxed/simple; bh=l9zo0EXonEq03TFI/f6JGfF7B1OyrUbKh6aUqoUh/vQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Llt1w4q3PXzguV0w5pHsN0uBnmt/nhBjc7NGIaTGAQLkjYDj6+u2Rz67AHZWPJ55pvVnn/niWbuisnQFIFYP7C7OnKeIfemnfaPm7k/a7rkxwCEiNvjvkcQ4Ps1rQF5eRQluezxq6t3AhRHoOTim7D9vE1YqVftZAGFxbozSHKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bdAhJPAP; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bdAhJPAP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AJBBsTnUoSekD8Jtjh4VEvFM2BerBPLv40YPx1hJJCY=; b=bdAhJPAPdh/KG/em3qrEBVo28DDTr8wkPNEaTQAIjUvchwQ4R/59uckt/DBYvc413BXNeo b5xgS1vP88WLuUPzhJJxb9KqKsaKpmJ7W857qcD7sF9tCwkYl6CYHG6lEiofjmruE/My/0 UQ81GvkXhGgaNyF4YlfJIt/Gqyw5e4g= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-225-YtZfbOEFOAGZpslpj4TF5w-1; Thu, 11 Dec 2025 07:18:49 -0500 X-MC-Unique: YtZfbOEFOAGZpslpj4TF5w-1 X-Mimecast-MFC-AGG-ID: YtZfbOEFOAGZpslpj4TF5w_1765455528 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E4BAC18009C0; Thu, 11 Dec 2025 12:18:47 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1F8531956056; Thu, 11 Dec 2025 12:18:45 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/18] cifs: Scripted clean up fs/smb/client/reparse.h Date: Thu, 11 Dec 2025 12:17:11 +0000 Message-ID: <20251211121715.759074-19-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/reparse.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/smb/client/reparse.h b/fs/smb/client/reparse.h index 19caab2fd11e..cfbb7dd28958 100644 --- a/fs/smb/client/reparse.h +++ b/fs/smb/client/reparse.h @@ -130,11 +130,12 @@ bool cifs_reparse_point_to_fattr(struct cifs_sb_info = *cifs_sb, struct cifs_fattr *fattr, struct cifs_open_info_data *data); int create_reparse_symlink(const unsigned int xid, struct inode *inode, - struct dentry *dentry, struct cifs_tcon *tcon, - const char *full_path, const char *symname); -int mknod_reparse(unsigned int xid, struct inode *inode, - struct dentry *dentry, struct cifs_tcon *tcon, - const char *full_path, umode_t mode, dev_t dev); -struct reparse_data_buffer *smb2_get_reparse_point_buffer(const struct kve= c *rsp_iov, u32 *len); + struct dentry *dentry, struct cifs_tcon *tcon, + const char *full_path, const char *symname); +int mknod_reparse(unsigned int xid, struct inode *inode, struct dentry *de= ntry, + struct cifs_tcon *tcon, const char *full_path, umode_t mode, + dev_t dev); +struct reparse_data_buffer *smb2_get_reparse_point_buffer(const struct kve= c *rsp_iov, + u32 *plen); =20 #endif /* _CIFS_REPARSE_H */ From nobody Sun Feb 8 02:22:07 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 511683112BA for ; Thu, 11 Dec 2025 12:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455537; cv=none; b=kVyY5p4KPJN7nTKbL++ALScc4Rne75yx/0Ar05IfISlM6D73D6On660JOPxqhtq4TCEY58mckEFSr5m6dBvWNGc7C9uwh9On4w/jOQ8cjHQnp/hhVvEVtZ9APXhNapl2XKVcaryocpJkWnue1NGA+VxJjLMFJVbFkjOkYONZOBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765455537; c=relaxed/simple; bh=LDVxs4HVzGamgRyO4hgKW44vmux4lO4xwEKPQYnOq00=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S7OnfLXtWv6twlz6PatmHjY15WDK1o+9GY799IaDCP6ov2SpH06SnZuV2I6TkcH2BC3ZzXaLc6XocqELJQJxu0+AYaDKawAfQteNKj6qc7vZNdN9hesCoAEBNfoC/iPSZy3fDB0VfRfDaSxOhXnJ4O7fzywq3mH2ZSQc54IXTpY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MjqrlhrQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MjqrlhrQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1765455535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sYb0W3+K58jDqolNtPQz939MnKma4O1rdy9kUT/7xKE=; b=MjqrlhrQLVsG5IkxPhHHbZCRbyB/VKIZ2dnyZ0Z+gRNEY/BqlT3P4cn6uQW9dFWG1AQOwR hT+EGYclGGnhqhIKhhAUC3wq/Zlp22fERXxWr1HJJncOxt6WVySP1elpr9u34RKTOkab0l kuXSFPGAgrvmv+1ZwqOBF0R5RbmanTA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-CBpNi5YHN9ytx28_kxrkzw-1; Thu, 11 Dec 2025 07:18:52 -0500 X-MC-Unique: CBpNi5YHN9ytx28_kxrkzw-1 X-Mimecast-MFC-AGG-ID: CBpNi5YHN9ytx28_kxrkzw_1765455530 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C74E818001E2; Thu, 11 Dec 2025 12:18:50 +0000 (UTC) Received: from warthog.procyon.org.com (unknown [10.42.28.14]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0E164180049F; Thu, 11 Dec 2025 12:18:48 +0000 (UTC) From: David Howells To: Steve French Cc: David Howells , Paulo Alcantara , Enzo Matsumiya , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 18/18] cifs: Scripted clean up fs/smb/client/ntlmssp.h Date: Thu, 11 Dec 2025 12:17:12 +0000 Message-ID: <20251211121715.759074-20-dhowells@redhat.com> In-Reply-To: <20251211121715.759074-2-dhowells@redhat.com> References: <20251211121715.759074-2-dhowells@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Content-Type: text/plain; charset="utf-8" Remove externs, correct argument names and reformat declarations. Signed-off-by: David Howells cc: Steve French cc: Paulo Alcantara cc: Enzo Matsumiya cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Reviewed-by: Paulo Alcantara (Red Hat) --- fs/smb/client/ntlmssp.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/smb/client/ntlmssp.h b/fs/smb/client/ntlmssp.h index a11fddc321f6..be0365f08396 100644 --- a/fs/smb/client/ntlmssp.h +++ b/fs/smb/client/ntlmssp.h @@ -142,16 +142,17 @@ typedef struct _AUTHENTICATE_MESSAGE { * Size of the session key (crypto key encrypted with the password */ =20 -int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, struct cifs_ses = *ses); +int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, + struct cifs_ses *ses); int build_ntlmssp_negotiate_blob(unsigned char **pbuffer, u16 *buflen, struct cifs_ses *ses, struct TCP_Server_Info *server, const struct nls_table *nls_cp); int build_ntlmssp_smb3_negotiate_blob(unsigned char **pbuffer, u16 *buflen, - struct cifs_ses *ses, - struct TCP_Server_Info *server, - const struct nls_table *nls_cp); + struct cifs_ses *ses, + struct TCP_Server_Info *server, + const struct nls_table *nls_cp); int build_ntlmssp_auth_blob(unsigned char **pbuffer, u16 *buflen, - struct cifs_ses *ses, - struct TCP_Server_Info *server, - const struct nls_table *nls_cp); + struct cifs_ses *ses, + struct TCP_Server_Info *server, + const struct nls_table *nls_cp);