Re: [PATCH v3 12/22] smb: move some duplicate definitions to common/cifspdu.h

Namjae Jeon
2025-10-20T05:23:13Z

On Tue, Oct 14, 2025 at 4:30 PM <chenxiaosong.chenxiaosong@linux.dev> wrote:
>
> From: ChenXiaoSong <chenxiaosong@kylinos.cn>
>
> In order to maintain the code more easily, move duplicate definitions to
> new common header file.
>
> Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
> ---
> fs/smb/client/cifspdu.h | 153 +---------------------------------
> fs/smb/common/cifspdu.h | 165 +++++++++++++++++++++++++++++++++++++
> fs/smb/server/smb_common.h | 80 +-----------------
> 3 files changed, 167 insertions(+), 231 deletions(-)
> create mode 100644 fs/smb/common/cifspdu.h
>
> diff --git a/fs/smb/client/cifspdu.h b/fs/smb/client/cifspdu.h
> index c86a329e5822..9f42b0469d1a 100644
> --- a/fs/smb/client/cifspdu.h
> +++ b/fs/smb/client/cifspdu.h
> @@ -12,43 +12,10 @@
> #include <net/sock.h>
> #include <linux/unaligned.h>
> #include "../common/smbfsctl.h"
> +#include "../common/cifspdu.h"
I prefer naming it smb1pdu.h.

>
> #define CIFS_PROT 0
> #define POSIX_PROT (CIFS_PROT+1)
> -#define BAD_PROT 0xFFFF
Moving just this one doesn't look good.
Thanks.