smb: move SMB2 Status code to common header file
Subsystems (3)
[email protected]
reviewercover smb: move SMB2 Status code to common header file
From: ChenXiaoSong <[email protected]>
There are only slight differences between the client and server of SMB2 Status code definitions, in order to maintain the code more easily, move all definitions to common header file.
ChenXiaoSong (2):
smb/client: fix typo to STATUS_MCA_OCCURRED
smb: move SMB2 Status code to common header file
fs/smb/client/smb2file.c | 2 +-
fs/smb/client/smb2inode.c | 2 +-
fs/smb/client/smb2maperror.c | 4 +-
fs/smb/client/smb2misc.c | 2 +-
fs/smb/client/smb2ops.c | 2 +-
fs/smb/client/smb2pdu.c | 2 +-
fs/smb/client/smb2transport.c | 2 +-
fs/smb/{client => common}/smb2status.h | 163 ++-
fs/smb/server/oplock.c | 2 +-
fs/smb/server/server.c | 2 +-
fs/smb/server/smb2misc.c | 2 +-
fs/smb/server/smb2pdu.c | 2 +-
fs/smb/server/smb_common.c | 2 +-
fs/smb/server/smbstatus.h | 1822 ------------------------
fs/smb/server/transport_rdma.c | 2 +-
15 files changed, 122 insertions(+), 1891 deletions(-)
rename fs/smb/{client => common}/smb2status.h (96%)
delete mode 100644 fs/smb/server/smbstatus.hSignature · 1 line
2.34.1
[email protected]
reviewerPATCH 1/2 smb/client: fix typo to STATUS_MCA_OCCURRED
From: ChenXiaoSong <[email protected]>
Preparation for moving the SMB2 Status code definitions to a common header file.
--- fs/smb/client/smb2maperror.c | 2 +- fs/smb/client/smb2status.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/smb/client/smb2maperror.c +1 -1
@@ -1096,7 +1096,7 @@ static const struct status_to_posix_error smb2_error_map_table[] = { "STATUS_MOUNT_POINT_NOT_RESOLVED"}, {STATUS_INVALID_DEVICE_OBJECT_PARAMETER , -EIO , "STATUS_INVALID_DEVICE_OBJECT_PARAMETER"}, - {STATUS_MCA_OCCURED, -EIO, "STATUS_MCA_OCCURED"}, + {STATUS_MCA_OCCURRED, -EIO, "STATUS_MCA_OCCURRED"}, {STATUS_DRIVER_BLOCKED_CRITICAL, -EIO, "STATUS_DRIVER_BLOCKED_CRITICAL"}, {STATUS_DRIVER_BLOCKED, -EIO, "STATUS_DRIVER_BLOCKED"},
fs/smb/client/smb2status.h +1 -1
@@ -901,7 +901,7 @@ struct ntstatus {#define STATUS_DEVICE_ENUMERATION_ERROR cpu_to_le32(0xC0000366)#define STATUS_MOUNT_POINT_NOT_RESOLVED cpu_to_le32(0xC0000368)#define STATUS_INVALID_DEVICE_OBJECT_PARAMETER cpu_to_le32(0xC0000369) -#define STATUS_MCA_OCCURED cpu_to_le32(0xC000036A) +#define STATUS_MCA_OCCURRED cpu_to_le32(0xC000036A)#define STATUS_DRIVER_BLOCKED_CRITICAL cpu_to_le32(0xC000036B)#define STATUS_DRIVER_BLOCKED cpu_to_le32(0xC000036C)#define STATUS_DRIVER_DATABASE_ERROR cpu_to_le32(0xC000036D)
Signature · 1 line
2.34.1
[email protected]
reviewerPATCH 2/2 smb: move SMB2 Status code to common header file
In reply to [email protected]From: ChenXiaoSong <[email protected]>
There are only 4 different definitions between the client and server:
- STATUS_SERVER_UNAVAILABLE: from client/smb2status.h
- STATUS_FILE_NOT_AVAILABLE: from client/smb2status.h
- STATUS_NO_PREAUTH_INTEGRITY_HASH_OVERLAP: from server/smbstatus.h
- STATUS_INVALID_LOCK_RANGE: from server/smbstatus.h
Rename server/smbstatus.h to common/smb2status.h, and merge the 2 different definitions of client to common header file.
---
fs/smb/client/smb2file.c | 2 +-
fs/smb/client/smb2inode.c | 2 +-
fs/smb/client/smb2maperror.c | 2 +-
fs/smb/client/smb2misc.c | 2 +-
fs/smb/client/smb2ops.c | 2 +-
fs/smb/client/smb2pdu.c | 2 +-
fs/smb/client/smb2transport.c | 2 +-
fs/smb/{client => common}/smb2status.h | 161 ++-
fs/smb/server/oplock.c | 2 +-
fs/smb/server/server.c | 2 +-
fs/smb/server/smb2misc.c | 2 +-
fs/smb/server/smb2pdu.c | 2 +-
fs/smb/server/smb_common.c | 2 +-
fs/smb/server/smbstatus.h | 1822 ------------------------
fs/smb/server/transport_rdma.c | 2 +-
15 files changed, 120 insertions(+), 1889 deletions(-)
rename fs/smb/{client => common}/smb2status.h (96%)
delete mode 100644 fs/smb/server/smbstatus.hfs/smb/client/smb2file.c +1 -1
@@ -21,7 +21,7 @@#include "cifs_unicode.h" #include "fscache.h" #include "smb2proto.h" -#include "smb2status.h" +#include "../common/smb2status.h" static struct smb2_symlink_err_rsp *symlink_data (const struct kvec *iov) {
fs/smb/client/smb2inode.c +1 -1
@@ -24,7 +24,7 @@#include "smb2pdu.h" #include "smb2proto.h" #include "cached_dir.h" -#include "smb2status.h" +#include "../common/smb2status.h" static struct reparse_data_buffer *reparse_buf_ptr (struct kvec *iov) {
fs/smb/client/smb2maperror.c +1 -1
@@ -12,7 +12,7 @@#include "cifs_debug.h" #include "smb2pdu.h" #include "smb2proto.h" -#include "smb2status.h" +#include "../common/smb2status.h" #include "smb2glob.h" #include "trace.h"
fs/smb/client/smb2misc.c +1 -1
@@ -13,7 +13,7 @@#include "smb2proto.h" #include "cifs_debug.h" #include "cifs_unicode.h" -#include "smb2status.h" +#include "../common/smb2status.h" #include "smb2glob.h" #include "nterr.h" #include "cached_dir.h"
fs/smb/client/smb2ops.c +1 -1
@@ -21,7 +21,7 @@#include "cifsproto.h" #include "cifs_debug.h" #include "cifs_unicode.h" -#include "smb2status.h" +#include "../common/smb2status.h" #include "smb2glob.h" #include "cifs_ioctl.h" #include "smbdirect.h"
fs/smb/client/smb2pdu.c +1 -1
@@ -32,7 +32,7 @@#include "cifs_unicode.h" #include "cifs_debug.h" #include "ntlmssp.h" -#include "smb2status.h" +#include "../common/smb2status.h" #include "smb2glob.h" #include "cifspdu.h" #include "cifs_spnego.h"
fs/smb/client/smb2transport.c +1 -1
@@ -23,7 +23,7 @@#include "cifsproto.h" #include "smb2proto.h" #include "cifs_debug.h" -#include "smb2status.h" +#include "../common/smb2status.h" #include "smb2glob.h" static int
fs/smb/common/smb2status.h renamed from fs/smb/client/smb2status.h +107 -54
349 lines not on this page · raw message
fs/smb/server/oplock.c +1 -1
@@ -10,7 +10,7 @@#include "oplock.h" #include "smb_common.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "connection.h" #include "mgmt/user_session.h" #include "mgmt/share_config.h"
fs/smb/server/server.c +1 -1
@@ -15,7 +15,7 @@#include "server.h" #include "smb_common.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "connection.h" #include "transport_ipc.h" #include "mgmt/user_session.h"
fs/smb/server/smb2misc.c +1 -1
@@ -7,7 +7,7 @@#include "glob.h" #include "nterr.h" #include "smb_common.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "mgmt/user_session.h" #include "connection.h"
fs/smb/server/smb2pdu.c +1 -1
@@ -30,7 +30,7 @@#include "server.h" #include "smb_common.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "ksmbd_work.h" #include "mgmt/user_config.h" #include "mgmt/share_config.h"
fs/smb/server/smb_common.c +1 -1
@@ -9,7 +9,7 @@#include "smb_common.h" #include "server.h" #include "misc.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "connection.h" #include "ksmbd_work.h" #include "mgmt/user_session.h"
fs/smb/server/smbstatus.h deleted +0 -1822
1,822 lines not on this page · raw message
fs/smb/server/transport_rdma.c +1 -1
@@ -21,7 +21,7 @@#include "glob.h" #include "connection.h" #include "smb_common.h" -#include "smbstatus.h" +#include "../common/smb2status.h" #include "transport_rdma.h" #define SMB_DIRECT_PORT_IWARP 5445
Signature · 1 line
2.34.1