[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251102073059.3681026-3-chenxiaosong.chenxiaosong@linux.dev>
Date: Sun, 2 Nov 2025 15:30:47 +0800
From: chenxiaosong.chenxiaosong@...ux.dev
To: sfrench@...ba.org,
smfrench@...il.com,
linkinjeon@...nel.org,
linkinjeon@...ba.org,
christophe.jaillet@...adoo.fr
Cc: linux-cifs@...r.kernel.org,
linux-kernel@...r.kernel.org,
ChenXiaoSong <chenxiaosong@...inos.cn>
Subject: [PATCH v5 02/14] smb: move MAX_CIFS_SMALL_BUFFER_SIZE to common/smbglob.h
From: ChenXiaoSong <chenxiaosong@...inos.cn>
In order to maintain the code more easily, move duplicate definitions to
common header file.
By the way, add the copyright and author information for Namjae to
common/smbglob.h.
Signed-off-by: ChenXiaoSong <chenxiaosong@...inos.cn>
---
fs/smb/client/cifspdu.h | 1 -
fs/smb/common/smbglob.h | 4 ++++
fs/smb/server/smb_common.h | 2 --
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/smb/client/cifspdu.h b/fs/smb/client/cifspdu.h
index aba9caee8302..2fb1eb2fff41 100644
--- a/fs/smb/client/cifspdu.h
+++ b/fs/smb/client/cifspdu.h
@@ -86,7 +86,6 @@
#define NT_TRANSACT_GET_USER_QUOTA 0x07
#define NT_TRANSACT_SET_USER_QUOTA 0x08
-#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
/* future chained NTCreateXReadX bigger, but for time being NTCreateX biggest */
/* among the requests (NTCreateX response is bigger with wct of 34) */
#define MAX_CIFS_HDR_SIZE 0x58 /* 4 len + 32 hdr + (2*24 wct) + 2 bct + 2 pad */
diff --git a/fs/smb/common/smbglob.h b/fs/smb/common/smbglob.h
index fa3d30dc6022..7853b5771128 100644
--- a/fs/smb/common/smbglob.h
+++ b/fs/smb/common/smbglob.h
@@ -2,8 +2,10 @@
/*
*
* Copyright (C) International Business Machines Corp., 2002,2008
+ * 2018 Samsung Electronics Co., Ltd.
* Author(s): Steve French (sfrench@...ibm.com)
* Jeremy Allison (jra@...ba.org)
+ * Namjae Jeon (linkinjeon@...nel.org)
*
*/
#ifndef _COMMON_SMB_GLOB_H
@@ -65,4 +67,6 @@ static inline void inc_rfc1001_len(void *buf, int count)
#define CIFS_DEFAULT_IOSIZE (1024 * 1024)
+#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
+
#endif /* _COMMON_SMB_GLOB_H */
diff --git a/fs/smb/server/smb_common.h b/fs/smb/server/smb_common.h
index c3258a3231e4..a2c7ab994fb1 100644
--- a/fs/smb/server/smb_common.h
+++ b/fs/smb/server/smb_common.h
@@ -29,8 +29,6 @@
#define SMB_ECHO_INTERVAL (60 * HZ)
-#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
-
#define MAX_STREAM_PROT_LEN 0x00FFFFFF
/* Responses when opening a file. */
--
2.43.0
Powered by blists - more mailing lists