Skip to content

Commit 884a1d4

Browse files
ChenXiaoSongsmfrench
authored andcommitted
smb: move MAX_CIFS_SMALL_BUFFER_SIZE to common/smbglob.h
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@kylinos.cn> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 4a7f960 commit 884a1d4

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

fs/smb/client/cifspdu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
#define NT_TRANSACT_GET_USER_QUOTA 0x07
8787
#define NT_TRANSACT_SET_USER_QUOTA 0x08
8888

89-
#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
9089
/* future chained NTCreateXReadX bigger, but for time being NTCreateX biggest */
9190
/* among the requests (NTCreateX response is bigger with wct of 34) */
9291
#define MAX_CIFS_HDR_SIZE 0x58 /* 4 len + 32 hdr + (2*24 wct) + 2 bct + 2 pad */

fs/smb/common/smbglob.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
/*
33
*
44
* Copyright (C) International Business Machines Corp., 2002,2008
5+
* 2018 Samsung Electronics Co., Ltd.
56
* Author(s): Steve French (sfrench@us.ibm.com)
67
* Jeremy Allison (jra@samba.org)
8+
* Namjae Jeon (linkinjeon@kernel.org)
79
*
810
*/
911
#ifndef _COMMON_SMB_GLOB_H
@@ -65,4 +67,6 @@ static inline void inc_rfc1001_len(void *buf, int count)
6567

6668
#define CIFS_DEFAULT_IOSIZE (1024 * 1024)
6769

70+
#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
71+
6872
#endif /* _COMMON_SMB_GLOB_H */

fs/smb/server/smb_common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929

3030
#define SMB_ECHO_INTERVAL (60 * HZ)
3131

32-
#define MAX_CIFS_SMALL_BUFFER_SIZE 448 /* big enough for most */
33-
3432
#define MAX_STREAM_PROT_LEN 0x00FFFFFF
3533

3634
/* Responses when opening a file. */

0 commit comments

Comments
 (0)