Skip to content

Commit

Permalink
smb: move client and server files to common directory fs/smb
Browse files Browse the repository at this point in the history
commit 38c8a9a upstream.

Move CIFS/SMB3 related client and server files (cifs.ko and ksmbd.ko
and helper modules) to new fs/smb subdirectory:

   fs/cifs --> fs/smb/client
   fs/ksmbd --> fs/smb/server
   fs/smbfs_common --> fs/smb/common

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
[ added to stable trees to handle the directory change to handle the
  future stable patches due to the constant churn in this filesystem at
  the moment - gregkh ]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Steve French authored and gregkh committed Jun 28, 2023
1 parent 9d3e4bc commit 29429a1
Show file tree
Hide file tree
Showing 147 changed files with 32 additions and 25 deletions.
8 changes: 4 additions & 4 deletions MAINTAINERS
Expand Up @@ -5183,8 +5183,8 @@ S: Supported
W: https://wiki.samba.org/index.php/LinuxCIFS
T: git git://git.samba.org/sfrench/cifs-2.6.git
F: Documentation/admin-guide/cifs/
F: fs/cifs/
F: fs/smbfs_common/
F: fs/smb/client/
F: fs/smb/common/
F: include/uapi/linux/cifs

COMPACTPCI HOTPLUG CORE
Expand Down Expand Up @@ -11168,8 +11168,8 @@ L: linux-cifs@vger.kernel.org
S: Maintained
T: git git://git.samba.org/ksmbd.git
F: Documentation/filesystems/cifs/ksmbd.rst
F: fs/ksmbd/
F: fs/smbfs_common/
F: fs/smb/common/
F: fs/smb/server/

KERNEL UNIT TESTING FRAMEWORK (KUnit)
M: Brendan Higgins <brendanhiggins@google.com>
Expand Down
9 changes: 1 addition & 8 deletions fs/Kconfig
Expand Up @@ -371,14 +371,7 @@ config NFS_V4_2_SSC_HELPER
source "net/sunrpc/Kconfig"
source "fs/ceph/Kconfig"

source "fs/cifs/Kconfig"
source "fs/ksmbd/Kconfig"

config SMBFS_COMMON
tristate
default y if CIFS=y || SMB_SERVER=y
default m if CIFS=m || SMB_SERVER=m

source "fs/smb/Kconfig"
source "fs/coda/Kconfig"
source "fs/afs/Kconfig"
source "fs/9p/Kconfig"
Expand Down
4 changes: 1 addition & 3 deletions fs/Makefile
Expand Up @@ -94,9 +94,7 @@ obj-$(CONFIG_LOCKD) += lockd/
obj-$(CONFIG_NLS) += nls/
obj-y += unicode/
obj-$(CONFIG_SYSV_FS) += sysv/
obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
obj-$(CONFIG_CIFS) += cifs/
obj-$(CONFIG_SMB_SERVER) += ksmbd/
obj-$(CONFIG_SMBFS) += smb/
obj-$(CONFIG_HPFS_FS) += hpfs/
obj-$(CONFIG_NTFS_FS) += ntfs/
obj-$(CONFIG_NTFS3_FS) += ntfs3/
Expand Down
11 changes: 11 additions & 0 deletions fs/smb/Kconfig
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# smbfs configuration

source "fs/smb/client/Kconfig"
source "fs/smb/server/Kconfig"

config SMBFS
tristate
default y if CIFS=y || SMB_SERVER=y
default m if CIFS=m || SMB_SERVER=m
5 changes: 5 additions & 0 deletions fs/smb/Makefile
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_SMBFS) += common/
obj-$(CONFIG_CIFS) += client/
obj-$(CONFIG_SMB_SERVER) += server/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/cifs/cifsencrypt.c → fs/smb/client/cifsencrypt.c
Expand Up @@ -21,7 +21,7 @@
#include <linux/random.h>
#include <linux/highmem.h>
#include <linux/fips.h>
#include "../smbfs_common/arc4.h"
#include "../common/arc4.h"
#include <crypto/aead.h>

int __cifs_calc_signature(struct smb_rqst *rqst,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/cifs/cifsglob.h → fs/smb/client/cifsglob.h
Expand Up @@ -25,7 +25,7 @@
#include <crypto/internal/hash.h>
#include <linux/scatterlist.h>
#include <uapi/linux/cifs/cifs_mount.h>
#include "../smbfs_common/smb2pdu.h"
#include "../common/smb2pdu.h"
#include "smb2pdu.h"

#define SMB_PATH_MAX 260
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/cifspdu.h → fs/smb/client/cifspdu.h
Expand Up @@ -11,7 +11,7 @@

#include <net/sock.h>
#include <asm/unaligned.h>
#include "../smbfs_common/smbfsctl.h"
#include "../common/smbfsctl.h"

#define CIFS_PROT 0
#define POSIX_PROT (CIFS_PROT+1)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/cifs/inode.c → fs/smb/client/inode.c
Expand Up @@ -308,7 +308,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
fattr->cf_uid = uid;
}
}

fattr->cf_gid = cifs_sb->ctx->linux_gid;
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID)) {
u64 id = le64_to_cpu(info->Gid);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/cifs/smbencrypt.c → fs/smb/client/smbencrypt.c
Expand Up @@ -24,7 +24,7 @@
#include "cifsglob.h"
#include "cifs_debug.h"
#include "cifsproto.h"
#include "../smbfs_common/md4.h"
#include "../common/md4.h"

#ifndef false
#define false 0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions fs/smbfs_common/Makefile → fs/smb/common/Makefile
Expand Up @@ -3,5 +3,5 @@
# Makefile for Linux filesystem routines that are shared by client and server.
#

obj-$(CONFIG_SMBFS_COMMON) += cifs_arc4.o
obj-$(CONFIG_SMBFS_COMMON) += cifs_md4.o
obj-$(CONFIG_SMBFS) += cifs_arc4.o
obj-$(CONFIG_SMBFS) += cifs_md4.o
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/ksmbd/auth.c → fs/smb/server/auth.c
Expand Up @@ -29,7 +29,7 @@
#include "mgmt/user_config.h"
#include "crypto_ctx.h"
#include "transport_ipc.h"
#include "../smbfs_common/arc4.h"
#include "../common/arc4.h"

/*
* Fixed format data defining GSS header and fixed string
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/ksmbd/smb_common.h → fs/smb/server/smb_common.h
Expand Up @@ -10,7 +10,7 @@

#include "glob.h"
#include "nterr.h"
#include "../smbfs_common/smb2pdu.h"
#include "../common/smb2pdu.h"
#include "smb2pdu.h"

/* ksmbd's Specific ERRNO */
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fs/ksmbd/vfs.c → fs/smb/server/vfs.c
Expand Up @@ -18,7 +18,7 @@
#include <linux/sched/xacct.h>
#include <linux/crc32c.h>

#include "../internal.h" /* for vfs_path_lookup */
#include "../../internal.h" /* for vfs_path_lookup */

#include "glob.h"
#include "oplock.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 29429a1

Please sign in to comment.