2022-08-01 19:31:29

by Enzo Matsumiya

[permalink] [raw]
Subject: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

Hi,

As part of the ongoing effort to remove the "cifs" nomenclature from the
Linux SMB client, I'm proposing the rename of the module to "smbfs".

As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
associated with the security issues it presented in the past. Using
"SMBFS" makes clear what's the protocol in use for outsiders, but also
unties it from any particular protocol version. It also fits in the
already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.

This short patch series only changes directory names and includes/ifdefs in
headers and source code, and updates docs to reflect the rename. Other
than that, no source code/functionality is modified (WIP though).

Patch 1/3: effectively changes the module name to "smbfs" and create a
"cifs" module alias to maintain compatibility (a warning
should be added to indicate the complete removal/isolation of
CIFS/SMB1.0 code).
Patch 2/3: rename the source-code directory to align with the new module
name
Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
"cifs module" to use the new name

Enzo Matsumiya (3):
cifs: change module name to "smbfs.ko"
smbfs: rename directory "fs/cifs" -> "fs/smbfs"
smbfs: update doc references

Documentation/admin-guide/index.rst | 2 +-
.../admin-guide/{cifs => smbfs}/authors.rst | 0
.../admin-guide/{cifs => smbfs}/changes.rst | 4 +-
.../admin-guide/{cifs => smbfs}/index.rst | 0
.../{cifs => smbfs}/introduction.rst | 0
.../admin-guide/{cifs => smbfs}/todo.rst | 12 +-
.../admin-guide/{cifs => smbfs}/usage.rst | 168 +++++++++---------
.../{cifs => smbfs}/winucase_convert.pl | 0
Documentation/filesystems/index.rst | 2 +-
.../filesystems/{cifs => smbfs}/cifsroot.rst | 14 +-
.../filesystems/{cifs => smbfs}/index.rst | 0
.../filesystems/{cifs => smbfs}/ksmbd.rst | 2 +-
Documentation/networking/dns_resolver.rst | 2 +-
.../translations/zh_CN/admin-guide/index.rst | 2 +-
.../translations/zh_TW/admin-guide/index.rst | 2 +-
fs/Kconfig | 6 +-
fs/Makefile | 2 +-
fs/cifs/Makefile | 34 ----
fs/{cifs => smbfs}/Kconfig | 108 +++++------
fs/smbfs/Makefile | 34 ++++
fs/{cifs => smbfs}/asn1.c | 0
fs/{cifs => smbfs}/cifs_debug.c | 72 ++++----
fs/{cifs => smbfs}/cifs_debug.h | 4 +-
fs/{cifs => smbfs}/cifs_dfs_ref.c | 2 +-
fs/{cifs => smbfs}/cifs_fs_sb.h | 0
fs/{cifs => smbfs}/cifs_ioctl.h | 0
fs/{cifs => smbfs}/cifs_spnego.c | 4 +-
fs/{cifs => smbfs}/cifs_spnego.h | 0
.../cifs_spnego_negtokeninit.asn1 | 0
fs/{cifs => smbfs}/cifs_swn.c | 0
fs/{cifs => smbfs}/cifs_swn.h | 4 +-
fs/{cifs => smbfs}/cifs_unicode.c | 0
fs/{cifs => smbfs}/cifs_unicode.h | 0
fs/{cifs => smbfs}/cifs_uniupr.h | 0
fs/{cifs => smbfs}/cifsacl.c | 6 +-
fs/{cifs => smbfs}/cifsacl.h | 0
fs/{cifs => smbfs}/cifsencrypt.c | 0
fs/{cifs => smbfs}/cifsglob.h | 26 +--
fs/{cifs => smbfs}/cifspdu.h | 6 +-
fs/{cifs => smbfs}/cifsproto.h | 10 +-
fs/{cifs => smbfs}/cifsroot.c | 0
fs/{cifs => smbfs}/cifssmb.c | 14 +-
fs/{cifs => smbfs}/connect.c | 36 ++--
fs/{cifs/cifsfs.c => smbfs/core.c} | 49 ++---
fs/{cifs => smbfs}/dfs_cache.c | 2 +-
fs/{cifs => smbfs}/dfs_cache.h | 0
fs/{cifs => smbfs}/dir.c | 2 +-
fs/{cifs => smbfs}/dns_resolve.c | 0
fs/{cifs => smbfs}/dns_resolve.h | 0
fs/{cifs => smbfs}/export.c | 8 +-
fs/{cifs => smbfs}/file.c | 16 +-
fs/{cifs => smbfs}/fs_context.c | 20 +--
fs/{cifs => smbfs}/fs_context.h | 0
fs/{cifs => smbfs}/fscache.c | 0
fs/{cifs => smbfs}/fscache.h | 6 +-
fs/{cifs => smbfs}/inode.c | 10 +-
fs/{cifs => smbfs}/ioctl.c | 6 +-
fs/{cifs => smbfs}/link.c | 2 +-
fs/{cifs => smbfs}/misc.c | 14 +-
fs/{cifs => smbfs}/netlink.c | 0
fs/{cifs => smbfs}/netlink.h | 0
fs/{cifs => smbfs}/netmisc.c | 2 +-
fs/{cifs => smbfs}/nterr.c | 0
fs/{cifs => smbfs}/nterr.h | 0
fs/{cifs => smbfs}/ntlmssp.h | 2 +-
fs/{cifs => smbfs}/readdir.c | 4 +-
fs/{cifs => smbfs}/rfc1002pdu.h | 0
fs/{cifs => smbfs}/sess.c | 10 +-
fs/{cifs => smbfs}/smb1ops.c | 4 +-
fs/{cifs => smbfs}/smb2file.c | 2 +-
fs/{cifs => smbfs}/smb2glob.h | 0
fs/{cifs => smbfs}/smb2inode.c | 2 +-
fs/{cifs => smbfs}/smb2maperror.c | 0
fs/{cifs => smbfs}/smb2misc.c | 0
fs/{cifs => smbfs}/smb2ops.c | 32 ++--
fs/{cifs => smbfs}/smb2pdu.c | 22 +--
fs/{cifs => smbfs}/smb2pdu.h | 0
fs/{cifs => smbfs}/smb2proto.h | 0
fs/{cifs => smbfs}/smb2status.h | 0
fs/{cifs => smbfs}/smb2transport.c | 2 +-
fs/{cifs => smbfs}/smbdirect.c | 0
fs/{cifs => smbfs}/smbdirect.h | 2 +-
fs/{cifs => smbfs}/smbencrypt.c | 0
fs/{cifs => smbfs}/smberr.h | 0
fs/{cifs/cifsfs.h => smbfs/smbfs.h} | 12 +-
fs/{cifs => smbfs}/trace.c | 0
fs/{cifs => smbfs}/trace.h | 0
fs/{cifs => smbfs}/transport.c | 4 +-
fs/{cifs => smbfs}/unc.c | 0
fs/{cifs => smbfs}/winucase.c | 0
fs/{cifs => smbfs}/xattr.c | 18 +-
91 files changed, 414 insertions(+), 417 deletions(-)
rename Documentation/admin-guide/{cifs => smbfs}/authors.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/changes.rst (73%)
rename Documentation/admin-guide/{cifs => smbfs}/index.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/introduction.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/todo.rst (95%)
rename Documentation/admin-guide/{cifs => smbfs}/usage.rst (87%)
rename Documentation/admin-guide/{cifs => smbfs}/winucase_convert.pl (100%)
rename Documentation/filesystems/{cifs => smbfs}/cifsroot.rst (85%)
rename Documentation/filesystems/{cifs => smbfs}/index.rst (100%)
rename Documentation/filesystems/{cifs => smbfs}/ksmbd.rst (99%)
delete mode 100644 fs/cifs/Makefile
rename fs/{cifs => smbfs}/Kconfig (72%)
create mode 100644 fs/smbfs/Makefile
rename fs/{cifs => smbfs}/asn1.c (100%)
rename fs/{cifs => smbfs}/cifs_debug.c (96%)
rename fs/{cifs => smbfs}/cifs_debug.h (98%)
rename fs/{cifs => smbfs}/cifs_dfs_ref.c (99%)
rename fs/{cifs => smbfs}/cifs_fs_sb.h (100%)
rename fs/{cifs => smbfs}/cifs_ioctl.h (100%)
rename fs/{cifs => smbfs}/cifs_spnego.c (98%)
rename fs/{cifs => smbfs}/cifs_spnego.h (100%)
rename fs/{cifs => smbfs}/cifs_spnego_negtokeninit.asn1 (100%)
rename fs/{cifs => smbfs}/cifs_swn.c (100%)
rename fs/{cifs => smbfs}/cifs_swn.h (95%)
rename fs/{cifs => smbfs}/cifs_unicode.c (100%)
rename fs/{cifs => smbfs}/cifs_unicode.h (100%)
rename fs/{cifs => smbfs}/cifs_uniupr.h (100%)
rename fs/{cifs => smbfs}/cifsacl.c (99%)
rename fs/{cifs => smbfs}/cifsacl.h (100%)
rename fs/{cifs => smbfs}/cifsencrypt.c (100%)
rename fs/{cifs => smbfs}/cifsglob.h (99%)
rename fs/{cifs => smbfs}/cifspdu.h (99%)
rename fs/{cifs => smbfs}/cifsproto.h (99%)
rename fs/{cifs => smbfs}/cifsroot.c (100%)
rename fs/{cifs => smbfs}/cifssmb.c (99%)
rename fs/{cifs => smbfs}/connect.c (99%)
rename fs/{cifs/cifsfs.c => smbfs/core.c} (98%)
rename fs/{cifs => smbfs}/dfs_cache.c (99%)
rename fs/{cifs => smbfs}/dfs_cache.h (100%)
rename fs/{cifs => smbfs}/dir.c (99%)
rename fs/{cifs => smbfs}/dns_resolve.c (100%)
rename fs/{cifs => smbfs}/dns_resolve.h (100%)
rename fs/{cifs => smbfs}/export.c (91%)
rename fs/{cifs => smbfs}/file.c (99%)
rename fs/{cifs => smbfs}/fs_context.c (99%)
rename fs/{cifs => smbfs}/fs_context.h (100%)
rename fs/{cifs => smbfs}/fscache.c (100%)
rename fs/{cifs => smbfs}/fscache.h (98%)
rename fs/{cifs => smbfs}/inode.c (99%)
rename fs/{cifs => smbfs}/ioctl.c (99%)
rename fs/{cifs => smbfs}/link.c (99%)
rename fs/{cifs => smbfs}/misc.c (99%)
rename fs/{cifs => smbfs}/netlink.c (100%)
rename fs/{cifs => smbfs}/netlink.h (100%)
rename fs/{cifs => smbfs}/netmisc.c (99%)
rename fs/{cifs => smbfs}/nterr.c (100%)
rename fs/{cifs => smbfs}/nterr.h (100%)
rename fs/{cifs => smbfs}/ntlmssp.h (98%)
rename fs/{cifs => smbfs}/readdir.c (99%)
rename fs/{cifs => smbfs}/rfc1002pdu.h (100%)
rename fs/{cifs => smbfs}/sess.c (99%)
rename fs/{cifs => smbfs}/smb1ops.c (99%)
rename fs/{cifs => smbfs}/smb2file.c (99%)
rename fs/{cifs => smbfs}/smb2glob.h (100%)
rename fs/{cifs => smbfs}/smb2inode.c (99%)
rename fs/{cifs => smbfs}/smb2maperror.c (100%)
rename fs/{cifs => smbfs}/smb2misc.c (100%)
rename fs/{cifs => smbfs}/smb2ops.c (99%)
rename fs/{cifs => smbfs}/smb2pdu.c (99%)
rename fs/{cifs => smbfs}/smb2pdu.h (100%)
rename fs/{cifs => smbfs}/smb2proto.h (100%)
rename fs/{cifs => smbfs}/smb2status.h (100%)
rename fs/{cifs => smbfs}/smb2transport.c (99%)
rename fs/{cifs => smbfs}/smbdirect.c (100%)
rename fs/{cifs => smbfs}/smbdirect.h (99%)
rename fs/{cifs => smbfs}/smbencrypt.c (100%)
rename fs/{cifs => smbfs}/smberr.h (100%)
rename fs/{cifs/cifsfs.h => smbfs/smbfs.h} (97%)
rename fs/{cifs => smbfs}/trace.c (100%)
rename fs/{cifs => smbfs}/trace.h (100%)
rename fs/{cifs => smbfs}/transport.c (99%)
rename fs/{cifs => smbfs}/unc.c (100%)
rename fs/{cifs => smbfs}/winucase.c (100%)
rename fs/{cifs => smbfs}/xattr.c (98%)

--
2.35.3



2022-08-01 19:31:46

by Enzo Matsumiya

[permalink] [raw]
Subject: [RFC PATCH 1/3] cifs: change module name to "smbfs.ko"

Rename "cifs.ko" module to "smbfs.ko", but keep "cifs" as a module alias
for compatibility with existing scripts/tools.

TODO: update spnego and idmap key names, cifs-utils, etc, warn about
module rename
To discuss: procfs entries (/proc/fs/cifs)

Signed-off-by: Enzo Matsumiya <[email protected]>
---
fs/Kconfig | 4 +-
fs/Makefile | 2 +-
fs/cifs/Kconfig | 108 +++++++++++++++++-----------------
fs/cifs/Makefile | 24 ++++----
fs/cifs/cifs_debug.c | 72 +++++++++++------------
fs/cifs/cifs_debug.h | 4 +-
fs/cifs/cifs_dfs_ref.c | 2 +-
fs/cifs/cifs_spnego.c | 4 +-
fs/cifs/cifs_swn.h | 4 +-
fs/cifs/cifsacl.c | 6 +-
fs/cifs/cifsglob.h | 26 ++++----
fs/cifs/cifspdu.h | 6 +-
fs/cifs/cifsproto.h | 10 ++--
fs/cifs/cifssmb.c | 14 ++---
fs/cifs/connect.c | 36 ++++++------
fs/cifs/{cifsfs.c => core.c} | 49 +++++++--------
fs/cifs/dfs_cache.c | 2 +-
fs/cifs/dir.c | 2 +-
fs/cifs/export.c | 8 +--
fs/cifs/file.c | 16 ++---
fs/cifs/fs_context.c | 20 +++----
fs/cifs/fscache.h | 6 +-
fs/cifs/inode.c | 10 ++--
fs/cifs/ioctl.c | 6 +-
fs/cifs/link.c | 2 +-
fs/cifs/misc.c | 14 ++---
fs/cifs/netmisc.c | 2 +-
fs/cifs/ntlmssp.h | 2 +-
fs/cifs/readdir.c | 4 +-
fs/cifs/sess.c | 10 ++--
fs/cifs/smb1ops.c | 4 +-
fs/cifs/smb2file.c | 2 +-
fs/cifs/smb2inode.c | 2 +-
fs/cifs/smb2ops.c | 32 +++++-----
fs/cifs/smb2pdu.c | 22 +++----
fs/cifs/smb2transport.c | 2 +-
fs/cifs/smbdirect.h | 2 +-
fs/cifs/{cifsfs.h => smbfs.h} | 12 ++--
fs/cifs/transport.c | 4 +-
fs/cifs/xattr.c | 18 +++---
40 files changed, 287 insertions(+), 288 deletions(-)
rename fs/cifs/{cifsfs.c => core.c} (98%)
rename fs/cifs/{cifsfs.h => smbfs.h} (97%)

diff --git a/fs/Kconfig b/fs/Kconfig
index 5976eb33535f..860ca257c681 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -377,8 +377,8 @@ source "fs/ksmbd/Kconfig"

config SMBFS_COMMON
tristate
- default y if CIFS=y || SMB_SERVER=y
- default m if CIFS=m || SMB_SERVER=m
+ default y if SMBFS=y || SMB_SERVER=y
+ default m if SMBFS=m || SMB_SERVER=m

source "fs/coda/Kconfig"
source "fs/afs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
index 208a74e0b00e..a07039e124ce 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
obj-y += unicode/
obj-$(CONFIG_SYSV_FS) += sysv/
obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
-obj-$(CONFIG_CIFS) += cifs/
+obj-$(CONFIG_SMBFS) += cifs/
obj-$(CONFIG_SMB_SERVER) += ksmbd/
obj-$(CONFIG_HPFS_FS) += hpfs/
obj-$(CONFIG_NTFS_FS) += ntfs/
diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
index 3b7e3b9e4fd2..c2157720ffc1 100644
--- a/fs/cifs/Kconfig
+++ b/fs/cifs/Kconfig
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only
-config CIFS
- tristate "SMB3 and CIFS support (advanced network filesystem)"
+config SMBFS
+ tristate "SMBFS support (protocol versions 1, 2, and 3)"
depends on INET
select NLS
select CRYPTO
@@ -37,9 +37,9 @@ config CIFS
and similar very old servers.

This module provides an advanced network file system client
- for mounting to SMB3 (and CIFS) compliant servers. It includes
- support for DFS (hierarchical name space), secure per-user
- session establishment via Kerberos or NTLM or NTLMv2, RDMA
+ for mounting to SMB-compliant servers. It includes support for
+ DFS (hierarchical name space), secure per-user session
+ establishment via Kerberos or NTLM or NTLMv2, RDMA
(smbdirect), advanced security features, per-share encryption,
directory leases, safe distributed caching (oplock), optional packet
signing, Unicode and other internationalization improvements.
@@ -47,29 +47,29 @@ config CIFS
In general, the default dialects, SMB3 and later, enable better
performance, security and features, than would be possible with CIFS.
Note that when mounting to Samba, due to the CIFS POSIX extensions,
- CIFS mounts can provide slightly better POSIX compatibility
+ SMBFS mounts can provide slightly better POSIX compatibility
than SMB3 mounts. SMB2/SMB3 mount options are also
slightly simpler (compared to CIFS) due to protocol improvements.

If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y.

-config CIFS_STATS2
+config SMBFS_STATS2
bool "Extended statistics"
- depends on CIFS
+ depends on SMBFS
default y
help
Enabling this option will allow more detailed statistics on SMB
request timing to be displayed in /proc/fs/cifs/DebugData and also
allow optional logging of slow responses to dmesg (depending on the
- value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/cifs/usage.rst
+ value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/smbfs/usage.rst
for more details. These additional statistics may have a minor effect
on performance and memory utilization.

If unsure, say Y.

-config CIFS_ALLOW_INSECURE_LEGACY
+config SMBFS_ALLOW_INSECURE_LEGACY
bool "Support legacy servers which use less secure dialects"
- depends on CIFS
+ depends on SMBFS
default y
help
Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
@@ -78,69 +78,69 @@ config CIFS_ALLOW_INSECURE_LEGACY
of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.

Disabling this option prevents users from using vers=1.0 or vers=2.0
- on mounts with cifs.ko
+ on mounts with smbfs.ko

If unsure, say Y.

-config CIFS_UPCALL
+config SMBFS_UPCALL
bool "Kerberos/SPNEGO advanced session setup"
- depends on CIFS
+ depends on SMBFS
help
- Enables an upcall mechanism for CIFS which accesses userspace helper
+ Enables an upcall mechanism for SMBFS which accesses userspace helper
utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
which are needed to mount to certain secure servers (for which more
secure Kerberos authentication is required). If unsure, say Y.

-config CIFS_XATTR
+config SMBFS_XATTR
bool "CIFS extended attributes"
- depends on CIFS
+ depends on SMBFS
help
Extended attributes are name:value pairs associated with inodes by
the kernel or by users (see the attr(5) manual page for details).
- CIFS maps the name of extended attributes beginning with the user
+ SMBFS maps the name of extended attributes beginning with the user
namespace prefix to SMB/CIFS EAs. EAs are stored on Windows
servers without the user namespace prefix, but their names are
- seen by Linux cifs clients prefaced by the user namespace prefix.
+ seen by Linux SMBFS clients prefaced by the user namespace prefix.
The system namespace (used by some filesystems to store ACLs) is
not supported at this time.

If unsure, say Y.

-config CIFS_POSIX
- bool "CIFS POSIX Extensions"
- depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
+config SMBFS_POSIX
+ bool "SMBFS POSIX Extensions"
+ depends on SMBFS && SMBFS_ALLOW_INSECURE_LEGACY && SMBFS_XATTR
help
- Enabling this option will cause the cifs client to attempt to
+ Enabling this option will cause SMBFS to attempt to
negotiate a newer dialect with servers, such as Samba 3.0.5
or later, that optionally can handle more POSIX like (rather
than Windows like) file behavior. It also enables
support for POSIX ACLs (getfacl and setfacl) to servers
(such as Samba 3.10 and later) which can negotiate
- CIFS POSIX ACL support. If unsure, say N.
+ SMBFS POSIX ACL support. If unsure, say N.

-config CIFS_DEBUG
- bool "Enable CIFS debugging routines"
+config SMBFS_DEBUG
+ bool "Enable SMBFS debugging routines"
default y
- depends on CIFS
+ depends on SMBFS
help
Enabling this option adds helpful debugging messages to
- the cifs code which increases the size of the cifs module.
+ the SMBFS code which increases the size of the module.
If unsure, say Y.

-config CIFS_DEBUG2
- bool "Enable additional CIFS debugging routines"
- depends on CIFS_DEBUG
+config SMBFS_DEBUG2
+ bool "Enable additional SMBFS debugging routines"
+ depends on SMBFS_DEBUG
help
Enabling this option adds a few more debugging routines
- to the cifs code which slightly increases the size of
- the cifs module and can cause additional logging of debug
+ to the SMBFS code which slightly increases the size of
+ the module and can cause additional logging of debug
messages in some error paths, slowing performance. This
option can be turned off unless you are debugging
- cifs problems. If unsure, say N.
+ SMBFS problems. If unsure, say N.

-config CIFS_DEBUG_DUMP_KEYS
+config SMBFS_DEBUG_DUMP_KEYS
bool "Dump encryption keys for offline decryption (Unsafe)"
- depends on CIFS_DEBUG
+ depends on SMBFS_DEBUG
help
Enabling this will dump the encryption and decryption keys
used to communicate on an encrypted share connection on the
@@ -148,55 +148,55 @@ config CIFS_DEBUG_DUMP_KEYS
encrypted network captures. Enable this carefully.
If unsure, say N.

-config CIFS_DFS_UPCALL
+config SMBFS_DFS_UPCALL
bool "DFS feature support"
- depends on CIFS
+ depends on SMBFS
help
Distributed File System (DFS) support is used to access shares
transparently in an enterprise name space, even if the share
moves to a different server. This feature also enables
- an upcall mechanism for CIFS which contacts userspace helper
+ an upcall mechanism for SMBFS which contacts userspace helper
utilities to provide server name resolution (host names to
IP addresses) which is needed in order to reconnect to
servers if their addresses change or for implicit mounts of
DFS junction points. If unsure, say Y.

-config CIFS_SWN_UPCALL
+config SMBFS_SWN_UPCALL
bool "SWN feature support"
- depends on CIFS
+ depends on SMBFS
help
The Service Witness Protocol (SWN) is used to get notifications
from a highly available server of resource state changes. This
- feature enables an upcall mechanism for CIFS which contacts a
+ feature enables an upcall mechanism for SMBFS which contacts a
userspace daemon to establish the DCE/RPC connection to retrieve
the cluster available interfaces and resource change notifications.
If unsure, say Y.

-config CIFS_NFSD_EXPORT
- bool "Allow nfsd to export CIFS file system"
- depends on CIFS && BROKEN
+config SMBFS_NFSD_EXPORT
+ bool "Allow nfsd to export SMBFS file system"
+ depends on SMBFS && BROKEN
help
- Allows NFS server to export a CIFS mounted share (nfsd over cifs)
+ Allows NFS server to export a SMBFS mounted share (nfsd over SMBFS)

-config CIFS_SMB_DIRECT
+config SMBFS_SMB_DIRECT
bool "SMB Direct support"
- depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
+ depends on SMBFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMBFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
help
Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
SMB Direct allows transferring SMB packets over RDMA. If unsure,
say Y.

-config CIFS_FSCACHE
- bool "Provide CIFS client caching support"
- depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
+config SMBFS_FSCACHE
+ bool "Provide SMBFS client caching support"
+ depends on SMBFS=m && FSCACHE || SMBFS=y && FSCACHE=y
help
- Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
+ Makes SMBFS FS-Cache capable. Say Y here if you want your SMBFS data
to be cached locally on disk through the general filesystem cache
manager. If unsure, say N.

-config CIFS_ROOT
+config SMBFS_ROOT
bool "SMB root file system (Experimental)"
- depends on CIFS=y && IP_PNP
+ depends on SMBFS=y && IP_PNP
help
Enables root file system support over SMB protocol.

diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
index 8c9f2c00be72..07096b742b1d 100644
--- a/fs/cifs/Makefile
+++ b/fs/cifs/Makefile
@@ -1,11 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
#
-# Makefile for Linux CIFS/SMB2/SMB3 VFS client
+# Makefile for Linux SMBFS VFS client
#
-ccflags-y += -I$(src) # needed for trace events
-obj-$(CONFIG_CIFS) += cifs.o
+ccflags-y += -I$(src) # needed for trace events
+obj-$(CONFIG_SMBFS) += smbfs.o

-cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
+smbfs-y := trace.o core.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
cifs_unicode.o nterr.o cifsencrypt.o \
readdir.o ioctl.o sess.o export.o unc.o winucase.o \
@@ -17,18 +17,18 @@ $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h

$(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h

-cifs-$(CONFIG_CIFS_XATTR) += xattr.o
+smbfs-$(CONFIG_SMBFS_XATTR) += xattr.o

-cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
+smbfs-$(CONFIG_SMBFS_UPCALL) += cifs_spnego.o

-cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
+smbfs-$(CONFIG_SMBFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o

-cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
+smbfs-$(CONFIG_SMBFS_SWN_UPCALL) += netlink.o cifs_swn.o

-cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
+smbfs-$(CONFIG_SMBFS_FSCACHE) += fscache.o

-cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
+smbfs-$(CONFIG_SMBFS_SMB_DIRECT) += smbdirect.o

-cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
+smbfs-$(CONFIG_SMBFS_ROOT) += cifsroot.o

-cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
+smbfs-$(CONFIG_SMBFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 11fd85de7217..ae588a8caa90 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -15,12 +15,12 @@
#include "cifsglob.h"
#include "cifsproto.h"
#include "cifs_debug.h"
-#include "cifsfs.h"
+#include "smbfs.h"
#include "fs_context.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
#include "smbdirect.h"
#endif
#include "cifs_swn.h"
@@ -35,7 +35,7 @@ cifs_dump_mem(char *label, void *data, int length)

void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
{
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
struct smb_hdr *smb = buf;

cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
@@ -43,12 +43,12 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
cifs_dbg(VFS, "smb buf %p len %u\n", smb,
server->ops->calc_smb_size(smb, server));
-#endif /* CONFIG_CIFS_DEBUG2 */
+#endif /* CONFIG_SMBFS_DEBUG2 */
}

void cifs_dump_mids(struct TCP_Server_Info *server)
{
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
struct mid_q_entry *mid_entry;

if (server == NULL)
@@ -63,7 +63,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
mid_entry->pid,
mid_entry->callback_data,
mid_entry->mid);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
mid_entry->large_buf,
mid_entry->resp_buf,
@@ -79,7 +79,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
}
}
spin_unlock(&server->mid_lock);
-#endif /* CONFIG_CIFS_DEBUG2 */
+#endif /* CONFIG_SMBFS_DEBUG2 */
}

#ifdef CONFIG_PROC_FS
@@ -176,7 +176,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
seq_puts(m, "# Version:1\n");
seq_puts(m, "# Format:\n");
seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>");
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
seq_printf(m, " <filename> <mid>\n");
#else
seq_printf(m, " <filename>\n");
@@ -196,7 +196,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
cfile->pid,
from_kuid(&init_user_ns, cfile->uid),
cfile->dentry);
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
seq_printf(m, " %llu\n", cfile->fid.mid);
#else
seq_printf(m, "\n");
@@ -225,39 +225,39 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
"---------------------------------------------------\n");
seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
seq_printf(m, "Features:");
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
seq_printf(m, " DFS");
#endif
-#ifdef CONFIG_CIFS_FSCACHE
+#ifdef CONFIG_SMBFS_FSCACHE
seq_printf(m, ",FSCACHE");
#endif
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
seq_printf(m, ",SMB_DIRECT");
#endif
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
seq_printf(m, ",STATS2");
#else
seq_printf(m, ",STATS");
#endif
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
seq_printf(m, ",DEBUG2");
-#elif defined(CONFIG_CIFS_DEBUG)
+#elif defined(CONFIG_SMBFS_DEBUG)
seq_printf(m, ",DEBUG");
#endif
-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
seq_printf(m, ",ALLOW_INSECURE_LEGACY");
#endif
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
seq_printf(m, ",CIFS_POSIX");
#endif
-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
seq_printf(m, ",UPCALL(SPNEGO)");
#endif
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
seq_printf(m, ",XATTR");
#endif
seq_printf(m, ",ACL");
-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
seq_puts(m, ",WITNESS");
#endif
seq_putc(m, '\n');
@@ -279,7 +279,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)

if (server->hostname)
seq_printf(m, "Hostname: %s ", server->hostname);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (!server->rdma)
goto skip_rdma;

@@ -498,12 +498,12 @@ static ssize_t cifs_stats_proc_write(struct file *file,

rc = kstrtobool_from_user(buffer, count, &bv);
if (rc == 0) {
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
int i;

atomic_set(&total_buf_alloc_count, 0);
atomic_set(&total_small_buf_alloc_count, 0);
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */
atomic_set(&tcpSesReconnectCount, 0);
atomic_set(&tconInfoReconnectCount, 0);

@@ -514,7 +514,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
spin_lock(&cifs_tcp_ses_lock);
list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
server->max_in_flight = 0;
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
atomic_set(&server->num_cmds[i], 0);
atomic_set(&server->smb2slowcmd[i], 0);
@@ -522,7 +522,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
server->slowest_cmd[i] = 0;
server->fastest_cmd[0] = 0;
}
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */
list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
atomic_set(&tcon->num_smbs_sent, 0);
@@ -546,7 +546,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
static int cifs_stats_proc_show(struct seq_file *m, void *v)
{
int i;
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
int j;
#endif /* STATS2 */
struct TCP_Server_Info *server;
@@ -562,11 +562,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
cifs_min_rcv + tcpSesAllocCount.counter);
seq_printf(m, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
small_buf_alloc_count.counter, cifs_min_small);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
seq_printf(m, "Total Large %d Small %d Allocations\n",
atomic_read(&total_buf_alloc_count),
atomic_read(&total_small_buf_alloc_count));
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */

seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&mid_count));
seq_printf(m,
@@ -581,7 +581,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
spin_lock(&cifs_tcp_ses_lock);
list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
seq_printf(m, "\nMax requests in flight: %d", server->max_in_flight);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
seq_puts(m, "\nTotal time spent processing by command. Time ");
seq_printf(m, "units are jiffies (%d per second)\n", HZ);
seq_puts(m, " SMB3 CMD\tNumber\tTotal Time\tFastest\tSlowest\n");
@@ -630,7 +630,7 @@ static const struct proc_ops cifs_stats_proc_ops = {
.proc_write = cifs_stats_proc_write,
};

-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
#define PROC_FILE_DEFINE(name) \
static ssize_t name##_write(struct file *file, const char __user *buffer, \
size_t count, loff_t *ppos) \
@@ -702,11 +702,11 @@ cifs_proc_init(void)

proc_create("mount_params", 0444, proc_fs_cifs, &cifs_mount_params_proc_ops);

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops);
#endif

-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
proc_create("rdma_readwrite_threshold", 0644, proc_fs_cifs,
&cifs_rdma_readwrite_threshold_proc_fops);
proc_create("smbd_max_frmr_depth", 0644, proc_fs_cifs,
@@ -742,10 +742,10 @@ cifs_proc_clean(void)
remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
remove_proc_entry("mount_params", proc_fs_cifs);

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
remove_proc_entry("dfscache", proc_fs_cifs);
#endif
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
remove_proc_entry("rdma_readwrite_threshold", proc_fs_cifs);
remove_proc_entry("smbd_max_frmr_depth", proc_fs_cifs);
remove_proc_entry("smbd_keep_alive_interval", proc_fs_cifs);
@@ -972,7 +972,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,

cifs_security_flags_handle_must_flags(&flags);

- /* flags look ok - update the global security flags for cifs module */
+ /* flags look ok - update global security flags */
global_secflags = flags;
if (global_secflags & CIFSSEC_MUST_SIGN) {
/* requiring signing implies signing is allowed */
diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
index ee4ea2b60c0f..fd6d563b0e81 100644
--- a/fs/cifs/cifs_debug.h
+++ b/fs/cifs/cifs_debug.h
@@ -26,7 +26,7 @@ void dump_smb(void *, int);
#define VFS 1
#define FYI 2
extern int cifsFYI;
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
#define NOISY 4
#else
#define NOISY 0
@@ -37,7 +37,7 @@ extern int cifsFYI;
* debug ON
* --------
*/
-#ifdef CONFIG_CIFS_DEBUG
+#ifdef CONFIG_SMBFS_DEBUG


/*
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
index b0864da9ef43..c58e67bf62f0 100644
--- a/fs/cifs/cifs_dfs_ref.c
+++ b/fs/cifs/cifs_dfs_ref.c
@@ -18,7 +18,7 @@
#include <linux/inet.h>
#include "cifsglob.h"
#include "cifsproto.h"
-#include "cifsfs.h"
+#include "smbfs.h"
#include "dns_resolve.h"
#include "cifs_debug.h"
#include "cifs_unicode.h"
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 342717bf1dc2..fd49a1490daf 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -161,13 +161,13 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
spnego_key = request_key(&cifs_spnego_key_type, description, "");
revert_creds(saved_cred);

-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
if (cifsFYI && !IS_ERR(spnego_key)) {
struct cifs_spnego_msg *msg = spnego_key->payload.data[0];
cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024U,
msg->secblob_len + msg->sesskey_len));
}
-#endif /* CONFIG_CIFS_DEBUG2 */
+#endif /* CONFIG_SMBFS_DEBUG2 */

out:
kfree(description);
diff --git a/fs/cifs/cifs_swn.h b/fs/cifs/cifs_swn.h
index 8a9d2a5c9077..1b9da6281131 100644
--- a/fs/cifs/cifs_swn.h
+++ b/fs/cifs/cifs_swn.h
@@ -13,7 +13,7 @@ struct cifs_tcon;
struct sk_buff;
struct genl_info;

-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
extern int cifs_swn_register(struct cifs_tcon *tcon);

extern int cifs_swn_unregister(struct cifs_tcon *tcon);
@@ -48,5 +48,5 @@ static inline void cifs_swn_check(void) {}
static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}

-#endif /* CONFIG_CIFS_SWN_UPCALL */
+#endif /* CONFIG_SMBFS_SWN_UPCALL */
#endif /* _CIFS_SWN_H */
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index bf861fef2f0c..67e06386cfff 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -717,7 +717,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
}


-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
{
int num_subauth;
@@ -803,7 +803,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,

for (i = 0; i < num_aces; ++i) {
ppace[i] = (struct cifs_ace *) (acl_base + acl_size);
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
dump_ace(ppace[i], end_of_acl);
#endif
if (mode_from_special_sid &&
@@ -1162,7 +1162,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
return -EINVAL;
}

-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
if (psid->num_subauth) {
int i;
cifs_dbg(FYI, "SID revision %d num_auth %d\n",
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 3070407cafa7..58db1157d53c 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -691,7 +691,7 @@ struct TCP_Server_Info {
unsigned int total_read; /* total amount of data read in this pass */
atomic_t in_send; /* requests trying to send */
atomic_t num_waiters; /* blocked waiting to get in sendrecv */
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
__u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
@@ -728,11 +728,11 @@ struct TCP_Server_Info {
#define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server)
struct TCP_Server_Info *primary_server;

-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
bool use_swn_dstaddr;
struct sockaddr_storage swn_dstaddr;
#endif
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
bool is_dfs_conn; /* if a dfs connection */
struct mutex refpath_lock; /* protects leaf_fullpath */
/*
@@ -1252,14 +1252,14 @@ struct cifs_tcon {
__u32 max_chunks;
__u32 max_bytes_chunk;
__u32 max_bytes_copy;
-#ifdef CONFIG_CIFS_FSCACHE
+#ifdef CONFIG_SMBFS_FSCACHE
u64 resource_id; /* server resource id */
struct fscache_volume *fscache; /* cookie for share */
#endif
struct list_head pending_opens; /* list of incomplete opens */
struct cached_fid crfid; /* Cached root fid */
/* BB add field for back pointer to sb struct(s)? */
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
struct list_head ulist; /* cache update list */
#endif
struct delayed_work query_interfaces; /* query interfaces workqueue job */
@@ -1384,7 +1384,7 @@ struct cifs_fid {
__u32 access;
struct cifs_pending_open *pending_open;
unsigned int epoch;
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
__u64 mid;
#endif /* CIFS_DEBUG2 */
bool purge_cache;
@@ -1481,7 +1481,7 @@ struct cifs_readdata {
struct iov_iter *iter);
struct kvec iov[2];
struct TCP_Server_Info *server;
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
struct smbd_mr *mr;
#endif
unsigned int pagesz;
@@ -1506,7 +1506,7 @@ struct cifs_writedata {
unsigned int bytes;
int result;
struct TCP_Server_Info *server;
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
struct smbd_mr *mr;
#endif
unsigned int pagesz;
@@ -1689,7 +1689,7 @@ struct mid_q_entry {
__u32 pid; /* process id */
__u32 sequence_number; /* for CIFS signing */
unsigned long when_alloc; /* when mid was created */
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
unsigned long when_sent; /* time when smb send finished */
unsigned long when_received; /* when demux complete (taken off wire) */
#endif
@@ -1740,7 +1740,7 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
atomic_dec(&server->num_waiters);
}

-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
static inline void cifs_save_when_sent(struct mid_q_entry *mid)
{
mid->when_sent = jiffies;
@@ -1878,7 +1878,7 @@ result of setting MUST flags more than once will be to
require use of the stronger protocol */
#define CIFSSEC_MUST_NTLMV2 0x04004
#define CIFSSEC_MUST_KRB5 0x08008
-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
#define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
#else
#define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
@@ -2023,7 +2023,7 @@ extern atomic_t tconInfoReconnectCount;
/* Various Debug counters */
extern atomic_t buf_alloc_count; /* current number allocated */
extern atomic_t small_buf_alloc_count;
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
extern atomic_t total_buf_alloc_count; /* total allocated over all time */
extern atomic_t total_small_buf_alloc_count;
extern unsigned int slow_rsp_threshold; /* number of secs before logging */
@@ -2063,7 +2063,7 @@ extern mempool_t *cifs_mid_poolp;
/* Operations for different SMB versions */
#define SMB1_VERSION_STRING "1.0"
#define SMB20_VERSION_STRING "2.0"
-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
extern struct smb_version_operations smb1_operations;
extern struct smb_version_values smb1_values;
extern struct smb_version_operations smb20_operations;
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index aeba371c4c70..0c24fcbb6622 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -2152,7 +2152,7 @@ typedef struct {
#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
#define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
QFS PROXY call */
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
/* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
LockingX instead of posix locking call on unix sess (and we do not expect
LockingX to use different (ie Windows) semantics than posix locking on
@@ -2162,7 +2162,7 @@ typedef struct {
#define CIFS_UNIX_CAP_MASK 0x000003db
#else
#define CIFS_UNIX_CAP_MASK 0x00000013
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */


#define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
@@ -2607,7 +2607,7 @@ struct data_blob {
} __attribute__((packed));


-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
/*
For better POSIX semantics from Linux client, (even better
than the existing CIFS Unix Extensions) we need updated PDUs for:
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index d59aebefa71c..fd225e5d2456 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -9,7 +9,7 @@
#define _CIFSPROTO_H
#include <linux/nls.h>
#include "trace.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif

@@ -284,11 +284,11 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
int from_reconnect);
extern void cifs_put_tcon(struct cifs_tcon *tcon);

-#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
+#if IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL)
extern void cifs_dfs_release_automount_timer(void);
-#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
+#else /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
#define cifs_dfs_release_automount_timer() do { } while (0)
-#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
+#endif /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */

void cifs_proc_init(void);
void cifs_proc_clean(void);
@@ -656,7 +656,7 @@ int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix);
char *extract_hostname(const char *unc);
char *extract_sharename(const char *unc);

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
const char *old_path,
const struct nls_table *nls_codepage,
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 04a4c304d004..3177fc3a2321 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -32,11 +32,11 @@
#include "smb2proto.h"
#include "fscache.h"
#include "smbdirect.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif

-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
static struct {
int index;
char *name;
@@ -56,7 +56,7 @@ static struct {
#endif

/* define the number of elements in the cifs dialect array */
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
#define CIFS_NUM_PROT 2
#else /* not posix */
#define CIFS_NUM_PROT 1
@@ -1528,7 +1528,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
}

/* how much data is in the response? */
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
use_rdma_mr = rdata->mr;
#endif
data_len = server->ops->read_data_length(buf, use_rdma_mr);
@@ -1914,7 +1914,7 @@ cifs_writedata_release(struct kref *refcount)
{
struct cifs_writedata *wdata = container_of(refcount,
struct cifs_writedata, refcount);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (wdata->mr) {
smbd_deregister_mr(wdata->mr);
wdata->mr = NULL;
@@ -3360,7 +3360,7 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
}


-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX

/*Convert an Access Control Entry from wire format to local POSIX xattr format*/
static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
@@ -6054,7 +6054,7 @@ CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}

-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
/*
* Do a path-based QUERY_ALL_EAS call and parse the result. This is a common
* function used by listxattr and getxattr type calls. When ea_name is set,
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 1362210f3ece..90d0254e2735 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -45,7 +45,7 @@
#include "smb2proto.h"
#include "smbdirect.h"
#include "dns_resolve.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif
#include "fs_context.h"
@@ -68,7 +68,7 @@ struct mount_ctx {
struct TCP_Server_Info *server;
struct cifs_ses *ses;
struct cifs_tcon *tcon;
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
struct cifs_ses *root_ses;
uuid_t mount_id;
char *origin_fullpath, *leaf_fullpath;
@@ -429,7 +429,7 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
return rc;
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
static int __reconnect_target_unlocked(struct TCP_Server_Info *server, const char *target)
{
int rc;
@@ -841,7 +841,7 @@ is_smb_response(struct TCP_Server_Info *server, unsigned char type)
void
dequeue_mid(struct mid_q_entry *mid, bool malformed)
{
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
mid->when_received = jiffies;
#endif
spin_lock(&mid->server->mid_lock);
@@ -983,7 +983,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
*/
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
kfree(server->origin_fullpath);
kfree(server->leaf_fullpath);
#endif
@@ -1238,7 +1238,7 @@ cifs_demultiplex_thread(void *p)
cifs_dump_mem("Received Data is: ", bufs[i],
HEADER_SIZE(server));
smb2_add_credits_from_hdr(bufs[i], server);
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
if (server->ops->dump_detail)
server->ops->dump_detail(bufs[i],
server);
@@ -1467,7 +1467,7 @@ cifs_find_tcp_session(struct smb3_fs_context *ctx)
spin_lock(&cifs_tcp_ses_lock);
list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
spin_lock(&server->srv_lock);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
/*
* DFS failover implementation in cifs_reconnect() requires unique tcp sessions for
* DFS connections to do failover properly, so avoid sharing them with regular
@@ -1621,7 +1621,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
INIT_DELAYED_WORK(&tcp_ses->resolve, cifs_resolve_server);
INIT_DELAYED_WORK(&tcp_ses->reconnect, smb2_reconnect_server);
mutex_init(&tcp_ses->reconnect_mutex);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
mutex_init(&tcp_ses->refpath_lock);
#endif
memcpy(&tcp_ses->srcaddr, &ctx->srcaddr,
@@ -1647,8 +1647,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
else
tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
if (tcp_ses->rdma) {
-#ifndef CONFIG_CIFS_SMB_DIRECT
- cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
+#ifndef CONFIG_SMBFS_SMB_DIRECT
+ cifs_dbg(VFS, "CONFIG_SMBFS_SMB_DIRECT is not enabled\n");
rc = -ENOENT;
goto out_err_crypto_release;
#endif
@@ -2496,7 +2496,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
}

tcon->use_witness = false;
- if (IS_ENABLED(CONFIG_CIFS_SWN_UPCALL) && ctx->witness) {
+ if (IS_ENABLED(CONFIG_SMBFS_SWN_UPCALL) && ctx->witness) {
if (ses->server->vals->protocol_id >= SMB30_PROT_ID) {
if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) {
/*
@@ -3052,7 +3052,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
}

cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap);
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
if (cap & CIFS_UNIX_FCNTL_CAP)
cifs_dbg(FYI, "FCNTL cap\n");
if (cap & CIFS_UNIX_EXTATTR_CAP)
@@ -3285,7 +3285,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
return 0;
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
/* Get unique dfs connections */
static int mount_get_dfs_conns(struct mount_ctx *mnt_ctx)
{
@@ -3486,7 +3486,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
struct cifs_tcon *tcon = mnt_ctx->tcon;
struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
char *full_path;
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
#endif

@@ -3505,7 +3505,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)

rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
full_path);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
if (nodfs) {
if (rc == -EREMOTE)
rc = -EOPNOTSUPP;
@@ -3536,7 +3536,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
return rc;
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
static void set_root_ses(struct mount_ctx *mnt_ctx)
{
if (mnt_ctx->ses) {
@@ -3996,7 +3996,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
spin_unlock(&cifs_sb->tlink_tree_lock);

kfree(cifs_sb->prepath);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id);
#endif
call_rcu(&cifs_sb->rcu, delayed_free);
@@ -4383,7 +4383,7 @@ cifs_prune_tlinks(struct work_struct *work)
TLINK_IDLE_EXPIRE);
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
/* Update dfs referral path of superblock */
static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
const char *target)
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/core.c
similarity index 98%
rename from fs/cifs/cifsfs.c
rename to fs/cifs/core.c
index af4c5632490e..8b135c1cd5ae 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/core.c
@@ -4,7 +4,7 @@
* Copyright (C) International Business Machines Corp., 2002,2008
* Author(s): Steve French ([email protected])
*
- * Common Internet FileSystem (CIFS) client
+ * SMBFS client
*
*/

@@ -28,7 +28,7 @@
#include <linux/xattr.h>
#include <uapi/linux/magic.h>
#include <net/ipv6.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#define DECLARE_GLOBALS_HERE
#include "cifsglob.h"
@@ -39,10 +39,10 @@
#include <linux/key-type.h>
#include "cifs_spnego.h"
#include "fscache.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif
-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
#include "netlink.h"
#endif
#include "fs_context.h"
@@ -90,7 +90,7 @@ atomic_t tconInfoReconnectCount;
atomic_t mid_count;
atomic_t buf_alloc_count;
atomic_t small_buf_alloc_count;
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
atomic_t total_buf_alloc_count;
atomic_t total_small_buf_alloc_count;
#endif/* STATS2 */
@@ -115,7 +115,7 @@ module_param(cifs_max_pending, uint, 0444);
MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server for "
"CIFS/SMB1 dialect (N/A for SMB3) "
"Default: 32767 Range: 2 to 32767.");
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
unsigned int slow_rsp_threshold = 1;
module_param(slow_rsp_threshold, uint, 0644);
MODULE_PARM_DESC(slow_rsp_threshold, "Amount of time (in seconds) to wait "
@@ -266,12 +266,12 @@ cifs_read_super(struct super_block *sb)
goto out_no_root;
}

-#ifdef CONFIG_CIFS_NFSD_EXPORT
+#ifdef CONFIG_SMBFS_NFSD_EXPORT
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
cifs_dbg(FYI, "export ops supported\n");
sb->s_export_op = &cifs_export_ops;
}
-#endif /* CONFIG_CIFS_NFSD_EXPORT */
+#endif /* CONFIG_SMBFS_NFSD_EXPORT */

return 0;

@@ -759,7 +759,7 @@ static void cifs_umount_begin(struct super_block *sb)
return;
}

-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
static int cifs_show_stats(struct seq_file *s, struct dentry *root)
{
/* BB FIXME */
@@ -797,7 +797,7 @@ static const struct super_operations cifs_super_ops = {
as opens */
.show_options = cifs_show_options,
.umount_begin = cifs_umount_begin,
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
.show_stats = cifs_show_stats,
#endif
};
@@ -1116,6 +1116,7 @@ struct file_system_type cifs_fs_type = {
.fs_flags = FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("cifs");
+MODULE_ALIAS("cifs");

struct file_system_type smb3_fs_type = {
.owner = THIS_MODULE,
@@ -1612,7 +1613,7 @@ init_cifs(void)

atomic_set(&buf_alloc_count, 0);
atomic_set(&small_buf_alloc_count, 0);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
atomic_set(&total_buf_alloc_count, 0);
atomic_set(&total_small_buf_alloc_count, 0);
if (slow_rsp_threshold < 1)
@@ -1620,7 +1621,7 @@ init_cifs(void)
else if (slow_rsp_threshold > 32767)
cifs_dbg(VFS,
"slow response threshold set higher than recommended (0 to 32767)\n");
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */

atomic_set(&mid_count, 0);
GlobalCurrentXid = 0;
@@ -1693,21 +1694,21 @@ init_cifs(void)
if (rc)
goto out_destroy_mids;

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
rc = dfs_cache_init();
if (rc)
goto out_destroy_request_bufs;
-#endif /* CONFIG_CIFS_DFS_UPCALL */
-#ifdef CONFIG_CIFS_UPCALL
+#endif /* CONFIG_SMBFS_DFS_UPCALL */
+#ifdef CONFIG_SMBFS_UPCALL
rc = init_cifs_spnego();
if (rc)
goto out_destroy_dfs_cache;
-#endif /* CONFIG_CIFS_UPCALL */
-#ifdef CONFIG_CIFS_SWN_UPCALL
+#endif /* CONFIG_SMBFS_UPCALL */
+#ifdef CONFIG_SMBFS_SWN_UPCALL
rc = cifs_genl_init();
if (rc)
goto out_register_key_type;
-#endif /* CONFIG_CIFS_SWN_UPCALL */
+#endif /* CONFIG_SMBFS_SWN_UPCALL */

rc = init_cifs_idmap();
if (rc)
@@ -1728,15 +1729,15 @@ init_cifs(void)
out_init_cifs_idmap:
exit_cifs_idmap();
out_cifs_swn_init:
-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
cifs_genl_exit();
out_register_key_type:
#endif
-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
exit_cifs_spnego();
out_destroy_dfs_cache:
#endif
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
dfs_cache_destroy();
out_destroy_request_bufs:
#endif
@@ -1768,13 +1769,13 @@ exit_cifs(void)
unregister_filesystem(&smb3_fs_type);
cifs_dfs_release_automount_timer();
exit_cifs_idmap();
-#ifdef CONFIG_CIFS_SWN_UPCALL
+#ifdef CONFIG_SMBFS_SWN_UPCALL
cifs_genl_exit();
#endif
-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
exit_cifs_spnego();
#endif
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
dfs_cache_destroy();
#endif
cifs_destroy_request_bufs();
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index a9b6c3eba6de..f0d2d2c49f9e 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -334,7 +334,7 @@ const struct proc_ops dfscache_proc_ops = {
.proc_write = dfscache_proc_write,
};

-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
static inline void dump_tgts(const struct cache_entry *ce)
{
struct cache_dfs_tgt *t;
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index ce9b22aecfba..5b3728631552 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -13,7 +13,7 @@
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/file.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
diff --git a/fs/cifs/export.c b/fs/cifs/export.c
index 37c28415df1e..0395ef73b06d 100644
--- a/fs/cifs/export.c
+++ b/fs/cifs/export.c
@@ -4,8 +4,6 @@
* Copyright (C) International Business Machines Corp., 2007
* Author(s): Steve French ([email protected])
*
- * Common Internet FileSystem (CIFS) client
- *
* Operations related to support for exporting files via NFSD
*
*/
@@ -30,9 +28,9 @@
#include <linux/exportfs.h>
#include "cifsglob.h"
#include "cifs_debug.h"
-#include "cifsfs.h"
+#include "smbfs.h"

-#ifdef CONFIG_CIFS_NFSD_EXPORT
+#ifdef CONFIG_SMBFS_NFSD_EXPORT
static struct dentry *cifs_get_parent(struct dentry *dentry)
{
/* BB need to add code here eventually to enable export via NFSD */
@@ -50,5 +48,5 @@ const struct export_operations cifs_export_ops = {
.encode_fs = */
};

-#endif /* CONFIG_CIFS_NFSD_EXPORT */
+#endif /* CONFIG_SMBFS_NFSD_EXPORT */

diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index a592fdf04313..90567ae51fa7 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -22,7 +22,7 @@
#include <linux/swap.h>
#include <linux/mm.h>
#include <asm/div64.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -2942,7 +2942,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
if (wdata->cfile->invalidHandle)
rc = -EAGAIN;
else {
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (wdata->mr) {
wdata->mr->need_invalidate = true;
smbd_deregister_mr(wdata->mr);
@@ -3455,7 +3455,7 @@ cifs_readdata_release(struct kref *refcount)
{
struct cifs_readdata *rdata = container_of(refcount,
struct cifs_readdata, refcount);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (rdata->mr) {
smbd_deregister_mr(rdata->mr);
rdata->mr = NULL;
@@ -3599,7 +3599,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
if (iter)
result = copy_page_from_iter(
page, page_offset, n, iter);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
else if (rdata->mr)
result = n;
#endif
@@ -3676,7 +3676,7 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
if (rdata->cfile->invalidHandle)
rc = -EAGAIN;
else {
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (rdata->mr) {
rdata->mr->need_invalidate = true;
smbd_deregister_mr(rdata->mr);
@@ -4212,7 +4212,7 @@ cifs_page_mkwrite(struct vm_fault *vmf)
/* Wait for the page to be written to the cache before we allow it to
* be modified. We then assume the entire page will need writing back.
*/
-#ifdef CONFIG_CIFS_FSCACHE
+#ifdef CONFIG_SMBFS_FSCACHE
if (PageFsCache(page) &&
wait_on_page_fscache_killable(page) < 0)
return VM_FAULT_RETRY;
@@ -4367,7 +4367,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
if (iter)
result = copy_page_from_iter(
page, page_offset, n, iter);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
else if (rdata->mr)
result = n;
#endif
@@ -4960,7 +4960,7 @@ static void cifs_swap_deactivate(struct file *file)
* Mark a page as having been made dirty and thus needing writeback. We also
* need to pin the cache object to write back to.
*/
-#ifdef CONFIG_CIFS_FSCACHE
+#ifdef CONFIG_SMBFS_FSCACHE
static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
{
return fscache_dirty_folio(mapping, folio,
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 8dc0d923ef6a..a8366986bf73 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -13,7 +13,7 @@
#include <linux/magic.h>
#include <linux/security.h>
#include <net/net_namespace.h>
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif
*/
@@ -25,7 +25,7 @@
#include <linux/mount.h>
#include <linux/parser.h>
#include <linux/utsname.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -339,7 +339,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
substring_t args[MAX_OPT_ARGS];

switch (match_token(value, cifs_smb_version_tokens, args)) {
-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
case Smb_1:
if (disable_legacy_dialects) {
cifs_errorf(fc, "mount with legacy dialect disabled\n");
@@ -825,7 +825,7 @@ static int smb3_reconfigure(struct fs_context *fc)
smb3_cleanup_fs_context_contents(cifs_sb->ctx);
rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
smb3_update_mnt_flags(cifs_sb);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
if (!rc)
rc = dfs_cache_remount_fs(cifs_sb);
#endif
@@ -1291,16 +1291,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
goto cifs_parse_mount_err;
break;
case Opt_witness:
-#ifndef CONFIG_CIFS_SWN_UPCALL
- cifs_errorf(fc, "Witness support needs CONFIG_CIFS_SWN_UPCALL config option\n");
+#ifndef CONFIG_SMBFS_SWN_UPCALL
+ cifs_errorf(fc, "Witness support needs CONFIG_SMBFS_SWN_UPCALL config option\n");
goto cifs_parse_mount_err;
#endif
ctx->witness = true;
pr_warn_once("Witness protocol support is experimental\n");
break;
case Opt_rootfs:
-#ifndef CONFIG_CIFS_ROOT
- cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
+#ifndef CONFIG_SMBFS_ROOT
+ cifs_dbg(VFS, "rootfs support requires CONFIG_SMBFS_ROOT config option\n");
goto cifs_parse_mount_err;
#endif
ctx->rootfs = true;
@@ -1399,8 +1399,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
break;
case Opt_fsc:
-#ifndef CONFIG_CIFS_FSCACHE
- cifs_errorf(fc, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n");
+#ifndef CONFIG_SMBFS_FSCACHE
+ cifs_errorf(fc, "FS-Cache support needs CONFIG_SMBFS_FSCACHE kernel config option set\n");
goto cifs_parse_mount_err;
#endif
ctx->fsc = true;
diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
index aa3b941a5555..ac2e5eb01af5 100644
--- a/fs/cifs/fscache.h
+++ b/fs/cifs/fscache.h
@@ -33,7 +33,7 @@ struct cifs_fscache_inode_coherency_data {
__le32 last_change_time_nsec;
};

-#ifdef CONFIG_CIFS_FSCACHE
+#ifdef CONFIG_SMBFS_FSCACHE

/*
* fscache.c
@@ -119,7 +119,7 @@ static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
return true;
}

-#else /* CONFIG_CIFS_FSCACHE */
+#else /* CONFIG_SMBFS_FSCACHE */
static inline
void cifs_fscache_fill_coherency(struct inode *inode,
struct cifs_fscache_inode_coherency_data *cd)
@@ -159,6 +159,6 @@ static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
return true; /* May release page */
}

-#endif /* CONFIG_CIFS_FSCACHE */
+#endif /* CONFIG_SMBFS_FSCACHE */

#endif /* _CIFS_FSCACHE_H */
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 3ad303dd5e5a..9da2c5644960 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -14,7 +14,7 @@
#include <linux/wait_bit.h>
#include <linux/fiemap.h>
#include <asm/div64.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -57,7 +57,7 @@ static void cifs_set_ops(struct inode *inode)
inode->i_data.a_ops = &cifs_addr_ops;
break;
case S_IFDIR:
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
if (IS_AUTOMOUNT(inode)) {
inode->i_op = &cifs_dfs_referral_inode_operations;
} else {
@@ -552,7 +552,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
struct cifs_sb_info *cifs_sb, unsigned int xid)
{
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
ssize_t rc;
char ea_value[4];
__u32 mode;
@@ -956,7 +956,7 @@ cifs_get_inode_info(struct inode **inode,
rc = server->ops->query_path_info(xid, tcon, cifs_sb,
full_path, tmp_data,
&adjust_tz, &is_reparse_point);
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
if (rc == -ENOENT && is_tcon_dfs(tcon))
rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon,
cifs_sb,
@@ -1833,7 +1833,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,

d_instantiate(dentry, newinode);

-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
cifs_dbg(FYI, "instantiated dentry %p %pd to inode %p\n",
dentry, dentry, newinode);

diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
index 0359b604bdbc..01f70c5352fd 100644
--- a/fs/cifs/ioctl.c
+++ b/fs/cifs/ioctl.c
@@ -17,7 +17,7 @@
#include "cifsglob.h"
#include "cifsproto.h"
#include "cifs_debug.h"
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifs_ioctl.h"
#include "smb2proto.h"
#include "smb2glob.h"
@@ -332,7 +332,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
break;
tcon = tlink_tcon(pSMBFile->tlink);
caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
if (CIFS_UNIX_EXTATTR_CAP & caps) {
__u64 ExtAttrMask = 0;
rc = CIFSGetExtAttr(xid, tcon,
@@ -345,7 +345,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
if (rc != EOPNOTSUPP)
break;
}
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */
rc = 0;
if (CIFS_I(inode)->cifsAttrs & ATTR_COMPRESSED) {
/* add in the compressed bit */
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index bbdf3281559c..640a8724ac8e 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -9,7 +9,7 @@
#include <linux/stat.h>
#include <linux/slab.h>
#include <linux/namei.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index 7a906067db04..5b03978e658c 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -18,8 +18,8 @@
#include "nterr.h"
#include "cifs_unicode.h"
#include "smb2pdu.h"
-#include "cifsfs.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#include "smbfs.h"
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dns_resolve.h"
#endif
#include "fs_context.h"
@@ -175,9 +175,9 @@ cifs_buf_get(void)
/* for most paths, more is cleared in header_assemble */
memset(ret_buf, 0, buf_size + 3);
atomic_inc(&buf_alloc_count);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
atomic_inc(&total_buf_alloc_count);
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */

return ret_buf;
}
@@ -208,9 +208,9 @@ cifs_small_buf_get(void)
/* No need to clear memory here, cleared in header assemble */
/* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
atomic_inc(&small_buf_alloc_count);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
atomic_inc(&total_small_buf_alloc_count);
-#endif /* CONFIG_CIFS_STATS2 */
+#endif /* CONFIG_SMBFS_STATS2 */

return ret_buf;
}
@@ -1246,7 +1246,7 @@ void cifs_put_tcp_super(struct super_block *sb)
__cifs_put_super(sb);
}

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
int match_target_ip(struct TCP_Server_Info *server,
const char *share, size_t share_len,
bool *result)
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 28caae7aed1b..8d461b29c0e2 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -16,7 +16,7 @@
#include <asm/div64.h>
#include <asm/byteorder.h>
#include <linux/inet.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
index 55758b9ec877..d22bf9591c3c 100644
--- a/fs/cifs/ntlmssp.h
+++ b/fs/cifs/ntlmssp.h
@@ -93,7 +93,7 @@ typedef struct _NEGOTIATE_MESSAGE {
struct ntlmssp_version {
__u8 ProductMajorVersion;
__u8 ProductMinorVersion;
- __le16 ProductBuild; /* we send the cifs.ko module version here */
+ __le16 ProductBuild; /* we send the module version here */
__u8 Reserved[3];
__u8 NTLMRevisionCurrent; /* currently 0x0F */
} __packed;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 384cabdf47ca..acfe26e3ec0e 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -18,7 +18,7 @@
#include "cifs_unicode.h"
#include "cifs_debug.h"
#include "cifs_fs_sb.h"
-#include "cifsfs.h"
+#include "smbfs.h"
#include "smb2proto.h"
#include "fs_context.h"

@@ -29,7 +29,7 @@
*/
#define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2)

-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
static void dump_cifs_file_struct(struct file *file, char *label)
{
struct cifsFileInfo *cf;
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 02c8b2906196..a6288850c7cc 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -18,7 +18,7 @@
#include <linux/utsname.h>
#include <linux/slab.h>
#include <linux/version.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifs_spnego.h"
#include "smb2proto.h"
#include "fs_context.h"
@@ -1376,7 +1376,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data)
ses->auth_key.response = NULL;
}

-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
static void
sess_auth_kerberos(struct sess_data *sess_data)
{
@@ -1515,7 +1515,7 @@ sess_auth_kerberos(struct sess_data *sess_data)
ses->auth_key.response = NULL;
}

-#endif /* ! CONFIG_CIFS_UPCALL */
+#endif /* ! CONFIG_SMBFS_UPCALL */

/*
* The required kvec buffers have to be allocated before calling this
@@ -1792,13 +1792,13 @@ static int select_sec(struct sess_data *sess_data)
sess_data->func = sess_auth_ntlmv2;
break;
case Kerberos:
-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
sess_data->func = sess_auth_kerberos;
break;
#else
cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
return -ENOSYS;
-#endif /* CONFIG_CIFS_UPCALL */
+#endif /* CONFIG_SMBFS_UPCALL */
case RawNTLMSSP:
sess_data->func = sess_auth_rawntlmssp_negotiate;
break;
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index f36b2d2d40ca..f60b6696a1c1 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -926,7 +926,7 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
const unsigned char *searchName, char **symlinkinfo,
const struct nls_table *nls_codepage)
{
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
int rc;
struct dfs_info3_param referral = {0};

@@ -1226,7 +1226,7 @@ struct smb_version_operations smb1_operations = {
.wp_retry_size = cifs_wp_retry_size,
.dir_needs_close = cifs_dir_needs_close,
.select_sectype = cifs_select_sectype,
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
.query_all_EAs = CIFSSMBQAllEAs,
.set_EA = CIFSSMBSetEA,
#endif /* CIFS_XATTR */
diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
index f5dcc4940b6d..82887064569a 100644
--- a/fs/cifs/smb2file.c
+++ b/fs/cifs/smb2file.c
@@ -11,7 +11,7 @@
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <asm/div64.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index 8571a459c710..66b2d03ea231 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -12,7 +12,7 @@
#include <linux/slab.h>
#include <linux/pagemap.h>
#include <asm/div64.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 82dd2e973753..012b8b8a96ba 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -14,7 +14,7 @@
#include <crypto/aead.h>
#include <linux/fiemap.h>
#include <uapi/linux/magic.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifsglob.h"
#include "smb2pdu.h"
#include "smb2proto.h"
@@ -379,7 +379,7 @@ smb2_find_dequeue_mid(struct TCP_Server_Info *server, char *buf)
static void
smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
{
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
struct smb2_hdr *shdr = (struct smb2_hdr *)buf;

cifs_server_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n",
@@ -437,7 +437,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
/* start with specified wsize, or default */
wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
wsize = min_t(unsigned int, wsize, server->max_write);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (server->rdma) {
if (server->sign)
/*
@@ -485,7 +485,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
/* start with specified rsize, or default */
rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
rsize = min_t(unsigned int, rsize, server->max_read);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (server->rdma) {
if (server->sign)
/*
@@ -930,7 +930,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
o_rsp = (struct smb2_create_rsp *)rsp_iov[0].iov_base;
oparms.fid->persistent_fid = o_rsp->PersistentFileId;
oparms.fid->volatile_fid = o_rsp->VolatileFileId;
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
oparms.fid->mid = le64_to_cpu(o_rsp->hdr.MessageId);
#endif /* CIFS_DEBUG2 */

@@ -1132,7 +1132,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}

-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
static ssize_t
move_smb2_ea_to_cifs(char *dst, size_t dst_size,
struct smb2_file_full_ea_info *src, size_t src_size,
@@ -1544,7 +1544,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
cfile->fid.persistent_fid = fid->persistent_fid;
cfile->fid.volatile_fid = fid->volatile_fid;
cfile->fid.access = fid->access;
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
cfile->fid.mid = fid->mid;
#endif /* CIFS_DEBUG2 */
server->ops->set_oplock_level(cinode, oplock, fid->epoch,
@@ -4352,7 +4352,7 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
}
}

-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
static bool
smb2_is_read_op(__u32 oplock)
{
@@ -4941,7 +4941,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid,
}

data_offset = server->ops->read_data_offset(buf);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
use_rdma_mr = rdata->mr;
#endif
data_len = server->ops->read_data_length(buf, use_rdma_mr);
@@ -5073,7 +5073,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
dw->ppages, dw->npages, dw->len,
true);
if (rc >= 0) {
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
mid->when_received = jiffies;
#endif
if (dw->server->ops->is_network_name_deleted)
@@ -5460,7 +5460,7 @@ smb2_make_node(unsigned int xid, struct inode *inode,
return rc;
}

-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
struct smb_version_operations smb20_operations = {
.compare_fids = smb2_compare_fids,
.setup_request = smb2_setup_request,
@@ -5544,7 +5544,7 @@ struct smb_version_operations smb20_operations = {
.dir_needs_close = smb2_dir_needs_close,
.get_dfs_refer = smb2_get_dfs_refer,
.select_sectype = smb2_select_sectype,
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
.query_all_EAs = smb2_query_eas,
.set_EA = smb2_set_ea,
#endif /* CIFS_XATTR */
@@ -5647,7 +5647,7 @@ struct smb_version_operations smb21_operations = {
.notify = smb3_notify,
.get_dfs_refer = smb2_get_dfs_refer,
.select_sectype = smb2_select_sectype,
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
.query_all_EAs = smb2_query_eas,
.set_EA = smb2_set_ea,
#endif /* CIFS_XATTR */
@@ -5761,7 +5761,7 @@ struct smb_version_operations smb30_operations = {
.receive_transform = smb3_receive_transform,
.get_dfs_refer = smb2_get_dfs_refer,
.select_sectype = smb2_select_sectype,
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
.query_all_EAs = smb2_query_eas,
.set_EA = smb2_set_ea,
#endif /* CIFS_XATTR */
@@ -5875,7 +5875,7 @@ struct smb_version_operations smb311_operations = {
.receive_transform = smb3_receive_transform,
.get_dfs_refer = smb2_get_dfs_refer,
.select_sectype = smb2_select_sectype,
-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
.query_all_EAs = smb2_query_eas,
.set_EA = smb2_set_ea,
#endif /* CIFS_XATTR */
@@ -5891,7 +5891,7 @@ struct smb_version_operations smb311_operations = {
.is_network_name_deleted = smb2_is_network_name_deleted,
};

-#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
+#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
struct smb_version_values smb20_values = {
.version_string = SMB20_VERSION_STRING,
.protocol_id = SMB20_PROT_ID,
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 131bec79d6fd..86decb4642aa 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -36,7 +36,7 @@
#include "cifs_spnego.h"
#include "smbdirect.h"
#include "trace.h"
-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
#include "dfs_cache.h"
#endif

@@ -1319,7 +1319,7 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
else
req->SecurityMode = 0;

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
#else
req->Capabilities = 0;
@@ -1402,7 +1402,7 @@ SMB2_sess_establish_session(struct SMB2_sess_data *sess_data)
return rc;
}

-#ifdef CONFIG_CIFS_UPCALL
+#ifdef CONFIG_SMBFS_UPCALL
static void
SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
{
@@ -1638,7 +1638,7 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
}

rc = SMB2_sess_establish_session(sess_data);
-#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
+#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
if (ses->server->dialect < SMB30_PROT_ID) {
cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
/*
@@ -3026,7 +3026,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
oparms->fid->persistent_fid = rsp->PersistentFileId;
oparms->fid->volatile_fid = rsp->VolatileFileId;
oparms->fid->access = oparms->desired_access;
-#ifdef CONFIG_CIFS_DEBUG2
+#ifdef CONFIG_SMBFS_DEBUG2
oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
#endif /* CIFS_DEBUG2 */

@@ -4057,7 +4057,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
io_parms->persistent_fid,
io_parms->tcon->tid, io_parms->tcon->ses->Suid,
io_parms->offset, io_parms->length);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
/*
* If we want to do a RDMA write, fill in and append
* smbd_buffer_descriptor_v1 to the end of read request
@@ -4177,7 +4177,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
default:
rdata->result = -EIO;
}
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
/*
* If this rdata has a memmory registered, the MR can be freed
* MR needs to be freed as soon as I/O finishes to prevent deadlock
@@ -4411,7 +4411,7 @@ smb2_writev_callback(struct mid_q_entry *mid)
wdata->result = -EIO;
break;
}
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
/*
* If this wdata has a memory registered, the MR can be freed
* The number of MRs available is limited, it's important to recover
@@ -4484,7 +4484,7 @@ smb2_async_writev(struct cifs_writedata *wdata,

trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid,
tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes);
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
/*
* If we want to do a server RDMA read, fill in and append
* smbd_buffer_descriptor_v1 to the end of write request
@@ -4536,7 +4536,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
rqst.rq_npages = wdata->nr_pages;
rqst.rq_pagesz = wdata->pagesz;
rqst.rq_tailsz = wdata->tailsz;
-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
if (wdata->mr) {
iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
rqst.rq_npages = 0;
@@ -4545,7 +4545,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
cifs_dbg(FYI, "async write at %llu %u bytes\n",
wdata->offset, wdata->bytes);

-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
/* For RDMA read, I/O size is in RemainingBytes not in Length */
if (!wdata->mr)
req->Length = cpu_to_le32(wdata->bytes);
diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
index f64922f340b3..00313a488e6f 100644
--- a/fs/cifs/smb2transport.c
+++ b/fs/cifs/smb2transport.c
@@ -454,7 +454,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
if (rc)
return rc;

-#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
+#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);
/*
* The session id is opaque in terms of endianness, so we can't
diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
index a87fca82a796..922344c8d5c1 100644
--- a/fs/cifs/smbdirect.h
+++ b/fs/cifs/smbdirect.h
@@ -7,7 +7,7 @@
#ifndef _SMBDIRECT_H
#define _SMBDIRECT_H

-#ifdef CONFIG_CIFS_SMB_DIRECT
+#ifdef CONFIG_SMBFS_SMB_DIRECT
#define cifs_rdma_enabled(server) ((server)->rdma)

#include "cifsglob.h"
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/smbfs.h
similarity index 97%
rename from fs/cifs/cifsfs.h
rename to fs/cifs/smbfs.h
index 81f4c15936d0..d067be5d3184 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/smbfs.h
@@ -115,7 +115,7 @@ extern int cifs_readdir(struct file *file, struct dir_context *ctx);
extern const struct dentry_operations cifs_dentry_ops;
extern const struct dentry_operations cifs_ci_dentry_ops;

-#ifdef CONFIG_CIFS_DFS_UPCALL
+#ifdef CONFIG_SMBFS_DFS_UPCALL
extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
#else
#define cifs_dfs_d_automount NULL
@@ -127,12 +127,12 @@ extern const char *cifs_get_link(struct dentry *, struct inode *,
extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
struct dentry *direntry, const char *symname);

-#ifdef CONFIG_CIFS_XATTR
+#ifdef CONFIG_SMBFS_XATTR
extern const struct xattr_handler *cifs_xattr_handlers[];
extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
#else
-# define cifs_xattr_handlers NULL
-# define cifs_listxattr NULL
+#define cifs_xattr_handlers NULL
+#define cifs_listxattr NULL
#endif

extern ssize_t cifs_file_copychunk_range(unsigned int xid,
@@ -148,9 +148,9 @@ struct smb3_fs_context;
extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
int flags, struct smb3_fs_context *ctx);

-#ifdef CONFIG_CIFS_NFSD_EXPORT
+#ifdef CONFIG_SMBFS_NFSD_EXPORT
extern const struct export_operations cifs_export_ops;
-#endif /* CONFIG_CIFS_NFSD_EXPORT */
+#endif /* CONFIG_SMBFS_NFSD_EXPORT */

/* when changing internal version - update following two lines at same time */
#define SMB3_PRODUCT_BUILD 38
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 160463e22c95..cd689b47d0d9 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -77,7 +77,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
{
struct mid_q_entry *midEntry =
container_of(refcount, struct mid_q_entry, refcount);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
__le16 command = midEntry->server->vals->lock_cmd;
__u16 smb_cmd = le16_to_cpu(midEntry->command);
unsigned long now;
@@ -96,7 +96,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
cifs_buf_release(midEntry->resp_buf);
else
cifs_small_buf_release(midEntry->resp_buf);
-#ifdef CONFIG_CIFS_STATS2
+#ifdef CONFIG_SMBFS_STATS2
now = jiffies;
if (now < midEntry->when_alloc)
cifs_server_dbg(VFS, "Invalid mid allocation time\n");
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 9d486fbbfbbd..bce40126e1a9 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -10,7 +10,7 @@
#include <linux/posix_acl_xattr.h>
#include <linux/slab.h>
#include <linux/xattr.h>
-#include "cifsfs.h"
+#include "smbfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -202,7 +202,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
}

case XATTR_ACL_ACCESS:
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
if (!value)
goto out;
if (sb->s_flags & SB_POSIXACL)
@@ -210,11 +210,11 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
value, (const int)size,
ACL_TYPE_ACCESS, cifs_sb->local_nls,
cifs_remap(cifs_sb));
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */
break;

case XATTR_ACL_DEFAULT:
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
if (!value)
goto out;
if (sb->s_flags & SB_POSIXACL)
@@ -222,7 +222,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
value, (const int)size,
ACL_TYPE_DEFAULT, cifs_sb->local_nls,
cifs_remap(cifs_sb));
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */
break;
}

@@ -366,23 +366,23 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
}

case XATTR_ACL_ACCESS:
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
if (sb->s_flags & SB_POSIXACL)
rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
value, size, ACL_TYPE_ACCESS,
cifs_sb->local_nls,
cifs_remap(cifs_sb));
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */
break;

case XATTR_ACL_DEFAULT:
-#ifdef CONFIG_CIFS_POSIX
+#ifdef CONFIG_SMBFS_POSIX
if (sb->s_flags & SB_POSIXACL)
rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
value, size, ACL_TYPE_DEFAULT,
cifs_sb->local_nls,
cifs_remap(cifs_sb));
-#endif /* CONFIG_CIFS_POSIX */
+#endif /* CONFIG_SMBFS_POSIX */
break;
}

--
2.35.3


2022-08-01 19:31:51

by Enzo Matsumiya

[permalink] [raw]
Subject: [RFC PATCH 3/3] smbfs: update doc references

Update documentation that referenced "cifs" (the module) to use "SMBFS"
or "smbfs".

Signed-off-by: Enzo Matsumiya <[email protected]>
---
Documentation/admin-guide/index.rst | 2 +-
.../admin-guide/{cifs => smbfs}/authors.rst | 0
.../admin-guide/{cifs => smbfs}/changes.rst | 4 +-
.../admin-guide/{cifs => smbfs}/index.rst | 0
.../{cifs => smbfs}/introduction.rst | 0
.../admin-guide/{cifs => smbfs}/todo.rst | 12 +-
.../admin-guide/{cifs => smbfs}/usage.rst | 168 +++++++++---------
.../{cifs => smbfs}/winucase_convert.pl | 0
Documentation/filesystems/index.rst | 2 +-
.../filesystems/{cifs => smbfs}/cifsroot.rst | 14 +-
.../filesystems/{cifs => smbfs}/index.rst | 0
.../filesystems/{cifs => smbfs}/ksmbd.rst | 2 +-
Documentation/networking/dns_resolver.rst | 2 +-
.../translations/zh_CN/admin-guide/index.rst | 2 +-
.../translations/zh_TW/admin-guide/index.rst | 2 +-
15 files changed, 104 insertions(+), 106 deletions(-)
rename Documentation/admin-guide/{cifs => smbfs}/authors.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/changes.rst (73%)
rename Documentation/admin-guide/{cifs => smbfs}/index.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/introduction.rst (100%)
rename Documentation/admin-guide/{cifs => smbfs}/todo.rst (95%)
rename Documentation/admin-guide/{cifs => smbfs}/usage.rst (87%)
rename Documentation/admin-guide/{cifs => smbfs}/winucase_convert.pl (100%)
rename Documentation/filesystems/{cifs => smbfs}/cifsroot.rst (85%)
rename Documentation/filesystems/{cifs => smbfs}/index.rst (100%)
rename Documentation/filesystems/{cifs => smbfs}/ksmbd.rst (99%)

diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
index 5bfafcbb9562..c9cbc5d48f40 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -74,7 +74,7 @@ configure specific aspects of kernel behavior to your liking.
btmrvl
cgroup-v1/index
cgroup-v2
- cifs/index
+ smbfs/index
clearing-warn-once
cpu-load
cputopology
diff --git a/Documentation/admin-guide/cifs/authors.rst b/Documentation/admin-guide/smbfs/authors.rst
similarity index 100%
rename from Documentation/admin-guide/cifs/authors.rst
rename to Documentation/admin-guide/smbfs/authors.rst
diff --git a/Documentation/admin-guide/cifs/changes.rst b/Documentation/admin-guide/smbfs/changes.rst
similarity index 73%
rename from Documentation/admin-guide/cifs/changes.rst
rename to Documentation/admin-guide/smbfs/changes.rst
index 3147bbae9c43..bbb4c082b991 100644
--- a/Documentation/admin-guide/cifs/changes.rst
+++ b/Documentation/admin-guide/smbfs/changes.rst
@@ -4,6 +4,6 @@ Changes

See https://wiki.samba.org/index.php/LinuxCIFSKernel for summary
information about fixes/improvements to CIFS/SMB2/SMB3 support (changes
-to cifs.ko module) by kernel version (and cifs internal module version).
-This may be easier to read than parsing the output of "git log fs/cifs"
+to smbfs.ko module) by kernel version (and smbfs internal module version).
+This may be easier to read than parsing the output of "git log fs/smbfs"
by release.
diff --git a/Documentation/admin-guide/cifs/index.rst b/Documentation/admin-guide/smbfs/index.rst
similarity index 100%
rename from Documentation/admin-guide/cifs/index.rst
rename to Documentation/admin-guide/smbfs/index.rst
diff --git a/Documentation/admin-guide/cifs/introduction.rst b/Documentation/admin-guide/smbfs/introduction.rst
similarity index 100%
rename from Documentation/admin-guide/cifs/introduction.rst
rename to Documentation/admin-guide/smbfs/introduction.rst
diff --git a/Documentation/admin-guide/cifs/todo.rst b/Documentation/admin-guide/smbfs/todo.rst
similarity index 95%
rename from Documentation/admin-guide/cifs/todo.rst
rename to Documentation/admin-guide/smbfs/todo.rst
index 2646ed2e2d3e..7926a2e09042 100644
--- a/Documentation/admin-guide/cifs/todo.rst
+++ b/Documentation/admin-guide/smbfs/todo.rst
@@ -42,8 +42,8 @@ f) Finish inotify support so kde and gnome file list windows
will autorefresh (partially complete by Asser). Needs minor kernel
vfs change to support removing D_NOTIFY on a file.

-g) Add GUI tool to configure /proc/fs/cifs settings and for display of
- the CIFS statistics (started)
+g) Add GUI tool to configure /proc/fs/smbfs settings and for display of
+ the SMBFS statistics (started)

h) implement support for security and trusted categories of xattrs
(requires minor protocol extension) to enable better support for SELINUX
@@ -56,7 +56,7 @@ j) Create UID mapping facility so server UIDs can be mapped on a per
exists. Also better integration with winbind for resolving SID owners

k) Add tools to take advantage of more smb3 specific ioctls and features
- (passthrough ioctl/fsctl is now implemented in cifs.ko to allow
+ (passthrough ioctl/fsctl is now implemented in smbfs.ko to allow
sending various SMB3 fsctls and query info and set info calls
directly from user space) Add tools to make setting various non-POSIX
metadata attributes easier from tools (e.g. extending what was done
@@ -67,7 +67,7 @@ l) encrypted file support (currently the attribute showing the file is
supported).

m) improved stats gathering tools (perhaps integration with nfsometer?)
- to extend and make easier to use what is currently in /proc/fs/cifs/Stats
+ to extend and make easier to use what is currently in /proc/fs/smbfs/Stats

n) Add support for claims based ACLs ("DAC")

@@ -81,14 +81,14 @@ q) Allow mount.cifs to be more verbose in reporting errors with dialect
or unsupported feature errors. This would now be easier due to the
implementation of the new mount API.

-r) updating cifs documentation, and user guide.
+r) updating smbfs documentation, and user guide.

s) Addressing bugs found by running a broader set of xfstests in standard
file system xfstest suite.

t) split cifs and smb3 support into separate modules so legacy (and less
secure) CIFS dialect can be disabled in environments that don't need it
- and simplify the code.
+ and simplify the code. (work in progress)

v) Additional testing of POSIX Extensions for SMB3.1.1

diff --git a/Documentation/admin-guide/cifs/usage.rst b/Documentation/admin-guide/smbfs/usage.rst
similarity index 87%
rename from Documentation/admin-guide/cifs/usage.rst
rename to Documentation/admin-guide/smbfs/usage.rst
index 3766bf8a1c20..ec9950d168d9 100644
--- a/Documentation/admin-guide/cifs/usage.rst
+++ b/Documentation/admin-guide/smbfs/usage.rst
@@ -5,7 +5,7 @@ Usage
This module supports the SMB3 family of advanced network protocols (as well
as older dialects, originally called "CIFS" or SMB1).

-The CIFS VFS module for Linux supports many advanced network filesystem
+The SMBFS VFS module for Linux supports many advanced network filesystem
features such as hierarchical DFS like namespace, hardlinks, locking and more.
It was designed to comply with the SNIA CIFS Technical Reference (which
supersedes the 1992 X/Open SMB Standard) as well as to perform best practice
@@ -35,7 +35,7 @@ For Linux:
and change directory into the top of the kernel directory tree
(e.g. /usr/src/linux-2.5.73)
2) make menuconfig (or make xconfig)
-3) select cifs from within the network filesystem choices
+3) select SMBFS from within the network filesystem choices (CONFIG_SMBFS)
4) save and exit
5) make

@@ -43,11 +43,11 @@ For Linux:
Installation instructions
=========================

-If you have built the CIFS vfs as module (successfully) simply
+If you have built the SMBFS client as module (successfully) simply
type ``make modules_install`` (or if you prefer, manually copy the file to
-the modules directory e.g. /lib/modules/2.4.10-4GB/kernel/fs/cifs/cifs.ko).
+the modules directory e.g. /lib/modules/$(uname -r)/kernel/fs/smbfs/smbfs.ko).

-If you have built the CIFS vfs into the kernel itself, follow the instructions
+If you have built the SMBFS client into the kernel itself, follow the instructions
for your distribution on how to install a new kernel (usually you
would simply type ``make install``).

@@ -62,14 +62,14 @@ Linux clients is useful in mapping Uids and Gids consistently across the
domain to the proper network user. The mount.cifs mount helper can be
found at cifs-utils.git on git.samba.org

-If cifs is built as a module, then the size and number of network buffers
+If smbfs is built as a module, then the size and number of network buffers
and maximum number of simultaneous requests to one server can be configured.
Changing these from their defaults is not recommended. By executing modinfo::

- modinfo kernel/fs/cifs/cifs.ko
+ modinfo kernel/fs/smbfs/smbfs.ko

-on kernel/fs/cifs/cifs.ko the list of configuration changes that can be made
-at module initialization time (by running insmod cifs.ko) can be seen.
+on kernel/fs/smbfs/smbfs.ko the list of configuration changes that can be made
+at module initialization time (by running insmod smbfs.ko) can be seen.

Recommendations
===============
@@ -85,11 +85,11 @@ improved POSIX behavior (NB: can use vers=3.0 to force only SMB3, never 2.1):

``mfsymlinks`` and either ``cifsacl`` or ``modefromsid`` (usually with ``idsfromsid``)

-Allowing User Mounts
+Allowing user mounts
====================

To permit users to mount and unmount over directories they own is possible
-with the cifs vfs. A way to enable such mounting is to mark the mount.cifs
+with SMBFS. A way to enable such mounting is to mark the mount.cifs
utility as suid (e.g. ``chmod +s /sbin/mount.cifs``). To enable users to
umount shares they mount requires

@@ -112,19 +112,19 @@ mount.cifs with the following flag: CIFS_ALLOW_USR_SUID
There is a corresponding manual page for cifs mounting in the Samba 3.0 and
later source tree in docs/manpages/mount.cifs.8

-Allowing User Unmounts
+Allowing user unmounts
======================

To permit users to unmount directories that they have user mounted (see above),
the utility umount.cifs may be used. It may be invoked directly, or if
umount.cifs is placed in /sbin, umount can invoke the cifs umount helper
-(at least for most versions of the umount utility) for umount of cifs
+(at least for most versions of the umount utility) for umount of SMBFS
mounts, unless umount is invoked with -i (which will avoid invoking a umount
helper). As with mount.cifs, to enable user unmounts umount.cifs must be marked
as suid (e.g. ``chmod +s /sbin/umount.cifs``) or equivalent (some distributions
allow adding entries to a file to the /etc/permissions file to achieve the
equivalent suid effect). For this utility to succeed the target path
-must be a cifs mount, and the uid of the current user must match the uid
+must be a SMBFS mount, and the uid of the current user must match the uid
of the user who mounted the resource.

Also note that the customary way of allowing user mounts and unmounts is
@@ -133,7 +133,7 @@ to the file /etc/fstab for each //server/share you wish to mount, but
this can become unwieldy when potential mount targets include many
or unpredictable UNC names.

-Samba Considerations
+Samba considerations
====================

Most current servers support SMB2.1 and SMB3 which are more secure,
@@ -141,7 +141,7 @@ but there are useful protocol extensions for the older less secure CIFS
dialect, so to get the maximum benefit if mounting using the older dialect
(CIFS/SMB1), we recommend using a server that supports the SNIA CIFS
Unix Extensions standard (e.g. almost any version of Samba ie version
-2.2.5 or later) but the CIFS vfs works fine with a wide variety of CIFS servers.
+2.2.5 or later) but SMBFS works fine with a wide variety of CIFS servers.
Note that uid, gid and file permissions will display default values if you do
not have a server that supports the Unix extensions for CIFS (such as Samba
2.2.5 or later). To enable the Unix CIFS Extensions in the Samba server, add
@@ -158,16 +158,16 @@ Linux::
ea support = yes

Note that server ea support is required for supporting xattrs from the Linux
-cifs client, and that EA support is present in later versions of Samba (e.g.
+SMBFS client, and that EA support is present in later versions of Samba (e.g.
3.0.6 and later (also EA support works in all versions of Windows, at least to
shares on NTFS filesystems). Extended Attribute (xattr) support is an optional
feature of most Linux filesystems which may require enabling via
make menuconfig. Client support for extended attributes (user xattr) can be
disabled on a per-mount basis by specifying ``nouser_xattr`` on mount.

-The CIFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
+The SMBFS client can get and set POSIX ACLs (getfacl, setfacl) to Samba servers
version 3.10 and later. Setting POSIX ACLs requires enabling both XATTR and
-then POSIX support in the CIFS configuration options when building the cifs
+then POSIX support in the SMBFS configuration options when building the smbfs
module. POSIX ACL support can be disabled on a per mount basic by specifying
``noacl`` on mount.

@@ -179,10 +179,10 @@ enabled on the server and client, subsequent setattr calls (e.g. chmod) can
fix the mode. Note that creating special devices (mknod) remotely
may require specifying a mkdev function to Samba if you are not using
Samba 3.0.6 or later. For more information on these see the manual pages
-(``man smb.conf``) on the Samba server system. Note that the cifs vfs,
-unlike the smbfs vfs, does not read the smb.conf on the client system
+(``man smb.conf``) on the Samba server system. Note that the SMBFS module,
+unlike the Samba userspace client, does not read the smb.conf on the client system
(the few optional settings are passed in on mount via -o parameters instead).
-Note that Samba 2.2.7 or later includes a fix that allows the CIFS VFS to delete
+Note that Samba 2.2.7 or later includes a fix that allows the SMBFS client to delete
open files (required for strict POSIX compliance). Windows Servers already
supported this feature. Samba server does not allow symlinks that refer to files
outside of the share, so in Samba versions prior to 3.0.6, most symlinks to
@@ -195,33 +195,33 @@ such symlinks safely by converting unsafe symlinks (ie symlinks to server
files that are outside of the share) to a samba specific format on the server
that is ignored by local server applications and non-cifs clients and that will
not be traversed by the Samba server). This is opaque to the Linux client
-application using the cifs vfs. Absolute symlinks will work to Samba 3.0.5 or
+application using the SMBFS module. Absolute symlinks will work to Samba 3.0.5 or
later, but only for remote clients using the CIFS Unix extensions, and will
be invisible to Windows clients and typically will not affect local
applications running on the same server as Samba.

-Use instructions
+Usage instructions
================

-Once the CIFS VFS support is built into the kernel or installed as a module
-(cifs.ko), you can use mount syntax like the following to access Samba or
+Once SMBFS support is built into the kernel or installed as a module
+(smbfs.ko), you can use mount syntax like the following to access Samba or
Mac or Windows servers::

mount -t cifs //9.53.216.11/e$ /mnt -o username=myname,password=mypassword

Before -o the option -v may be specified to make the mount.cifs
mount helper display the mount steps more verbosely.
-After -o the following commonly used cifs vfs specific options
+After -o the following commonly used SMBFS specific options
are supported::

username=<username>
password=<password>
domain=<domain name>

-Other cifs mount options are described below. Use of TCP names (in addition to
+Other smbfs mount options are described below. Use of TCP names (in addition to
ip addresses) is available if the mount helper (mount.cifs) is installed. If
you do not trust the server to which are mounted, or if you do not have
-cifs signing enabled (and the physical network is insecure), consider use
+signing enabled (and the physical network is insecure), consider use
of the standard mount options ``noexec`` and ``nosuid`` to reduce the risk of
running an altered binary on your local system (downloaded from a hostile server
or altered by a hostile router).
@@ -265,19 +265,19 @@ the Server's registry. Samba starting with version 3.10 will allow such
filenames (ie those which contain valid Linux characters, which normally
would be forbidden for Windows/CIFS semantics) as long as the server is
configured for Unix Extensions (and the client has not disabled
-/proc/fs/cifs/LinuxExtensionsEnabled). In addition the mount option
+/proc/fs/smbfs/LinuxExtensionsEnabled). In addition the mount option
``mapposix`` can be used on CIFS (vers=1.0) to force the mapping of
illegal Windows/NTFS/SMB characters to a remap range (this mount parameter
is the default for SMB3). This remap (``mapposix``) range is also
compatible with Mac (and "Services for Mac" on some older Windows).

-CIFS VFS Mount Options
+SMBFS mount options
======================
A partial list of the supported mount options follows:

username
The user name to use when trying to establish
- the CIFS session.
+ the SMB session.
password
The user password. If the mount helper is
installed, the user will be prompted for password
@@ -289,7 +289,7 @@ A partial list of the supported mount options follows:
mount.
domain
Set the SMB/CIFS workgroup name prepended to the
- username during CIFS session establishment
+ username during session establishment
forceuid
Set the default uid for inodes to the uid
passed in on mount. For mounts to servers
@@ -327,7 +327,7 @@ A partial list of the supported mount options follows:
(similar to above but for the group owner, gid, instead of uid)
uid
Set the default uid for inodes, and indicate to the
- cifs kernel driver which local user mounted. If the server
+ smbfs module which local user mounted. If the server
supports the unix extensions the default uid is
not used to fill in the owner fields of inodes (files)
unless the ``forceuid`` parameter is specified.
@@ -346,7 +346,7 @@ A partial list of the supported mount options follows:
caching is not suitable for all workloads for e.g. read-once
type workloads. So, you need to consider carefully your
workload/scenario before using this option. Currently, local
- disk caching is functional for CIFS files opened as read-only.
+ disk caching is functional for SMBFS files opened as read-only.
dir_mode
If CIFS Unix extensions are not supported by the server
this overrides the default mode for directory inodes.
@@ -366,21 +366,21 @@ A partial list of the supported mount options follows:
can not use rsize larger than CIFSMaxBufSize. CIFSMaxBufSize
defaults to 16K and may be changed (from 8K to the maximum
kmalloc size allowed by your kernel) at module install time
- for cifs.ko. Setting CIFSMaxBufSize to a very large value
- will cause cifs to use more memory and may reduce performance
+ for smbfs.ko. Setting CIFSMaxBufSize to a very large value
+ will cause smbfs to use more memory and may reduce performance
in some cases. To use rsize greater than 127K (the original
- cifs protocol maximum) also requires that the server support
+ protocol maximum) also requires that the server support
a new Unix Capability flag (for very large read) which some
newer servers (e.g. Samba 3.0.26 or later) do. rsize can be
set from a minimum of 2048 to a maximum of 130048 (127K or
CIFSMaxBufSize, whichever is smaller)
wsize
default write size (default 57344)
- maximum wsize currently allowed by CIFS is 57344 (fourteen
+ maximum wsize currently allowed by SMBFS is 57344 (fourteen
4096 byte pages)
actimeo=n
attribute cache timeout in seconds (default 1 second).
- After this timeout, the cifs client requests fresh attribute
+ After this timeout, the smbfs client requests fresh attribute
information from the server. This option allows to tune the
attribute cache timeout to suit the workload needs. Shorter
timeouts mean better the cache coherency, but increased number
@@ -409,8 +409,7 @@ A partial list of the supported mount options follows:

this might be useful when comma is contained within username
or password or domain. This option is less important
- when the cifs mount helper cifs.mount (version 1.1 or later)
- is used.
+ when the mount helper cifs.mount (version 1.1 or later) is used.
nosuid
Do not allow remote executables with the suid bit
program to be executed. This is only meaningful for mounts
@@ -431,11 +430,10 @@ A partial list of the supported mount options follows:
be executed (default for mounts when executed as root,
nosuid is default for user mounts).
credentials
- Although ignored by the cifs kernel component, it is used by
- the mount helper, mount.cifs. When mount.cifs is installed it
- opens and reads the credential file specified in order
- to obtain the userid and password arguments which are passed to
- the cifs vfs.
+ Although ignored by the SMBFS module, it is used by the mount
+ helper mount.cifs. When mount.cifs is installed it opens and
+ reads the credential file specified in order to obtain the
+ userid and password arguments which are passed to the SMBFS module.
guest
Although ignored by the kernel component, the mount.cifs
mount helper will not prompt the user for a password
@@ -472,8 +470,8 @@ A partial list of the supported mount options follows:
shared higher level directory). Note that some older
(e.g. pre-Windows 2000) do not support returning UniqueIDs
or the CIFS Unix Extensions equivalent and for those
- this mount option will have no effect. Exporting cifs mounts
- under nfsd requires this mount option on the cifs mount.
+ this mount option will have no effect. Exporting SMBFS mounts
+ under nfsd requires this mount option.
This is now the default if server supports the
required network operation.
noserverino
@@ -546,7 +544,7 @@ A partial list of the supported mount options follows:
*?<>|:

to the remap range (above 0xF000), which also
- allows the CIFS client to recognize files created with
+ allows the SMBFS client to recognize files created with
such characters by Windows's POSIX emulation. This can
also be useful when mounting to most versions of Samba
(which also forbids creating and opening files
@@ -588,22 +586,22 @@ A partial list of the supported mount options follows:
(presumably rare) applications, originally coded for
DOS/Windows, which require Windows style mandatory byte range
locking, they may be able to take advantage of this option,
- forcing the cifs client to only send mandatory locks
- even if the cifs server would support posix advisory locks.
+ forcing the SMBFS client to only send mandatory locks
+ even if the SMB server would support posix advisory locks.
``forcemand`` is accepted as a shorter form of this mount
option.
nostrictsync
If this mount option is set, when an application does an
- fsync call then the cifs client does not send an SMB Flush
+ fsync call then the SMBFS client does not send an SMB Flush
to the server (to force the server to write all dirty data
- for this file immediately to disk), although cifs still sends
+ for this file immediately to disk), although SMBFS still sends
all dirty (cached) file data to the server and waits for the
server to respond to the write. Since SMB Flush can be
very slow, and some servers may be reliable enough (to risk
delaying slightly flushing the data to disk on the server),
turning on this option may be useful to improve performance for
applications that fsync too much, at a small risk of server
- crash. If this mount option is not set, by default cifs will
+ crash. If this mount option is not set, by default SMBFS will
send an SMB flush request (and wait for a response) on every
fsync call.
nodfs
@@ -651,15 +649,15 @@ A partial list of the supported mount options follows:
locallease
This option is rarely needed. Fcntl F_SETLEASE is
used by some applications such as Samba and NFSv4 server to
- check to see whether a file is cacheable. CIFS has no way
+ check to see whether a file is cacheable. SMBFS has no way
to explicitly request a lease, but can check whether a file
is cacheable (oplocked). Unfortunately, even if a file
- is not oplocked, it could still be cacheable (ie cifs client
+ is not oplocked, it could still be cacheable (ie SMBFS client
could grant fcntl leases if no other local processes are using
the file) for cases for example such as when the server does not
support oplocks and the user is sure that the only updates to
the file will be from this client. Specifying this mount option
- will allow the cifs client to check for leases (only) locally
+ will allow the SMBFS client to check for leases (only) locally
for files which are not oplocked instead of denying leases
in that case. (EXPERIMENTAL)
sec
@@ -675,7 +673,7 @@ A partial list of the supported mount options follows:
Use NTLM password hashing (default)
ntlmi
Use NTLM password hashing with signing (if
- /proc/fs/cifs/PacketSigningEnabled on or if
+ /proc/fs/smbfs/PacketSigningEnabled on or if
server requires signing also can be the default)
ntlmv2
Use NTLMv2 password hashing
@@ -700,17 +698,17 @@ including:
-? display simple usage information
=============== ===============================================================

-With most 2.6 kernel versions of modutils, the version of the cifs kernel
+With most kernel versions of modutils, the version of the SMBFS kernel
module can be displayed via modinfo.

-Misc /proc/fs/cifs Flags and Debug Info
+Misc /proc/fs/smbfs Flags and debug info
=======================================

Informational pseudo-files:

======================= =======================================================
-DebugData Displays information about active CIFS sessions and
- shares, features enabled as well as the cifs.ko
+DebugData Displays information about active SMBFS sessions and
+ shares, features enabled as well as the smbfs.ko
version.
Stats Lists summary resource usage information as well as per
share statistics.
@@ -737,7 +735,7 @@ SecurityFlags Flags which control security negotiation and
options to be enabled. Enabling plaintext
authentication currently requires also enabling
lanman authentication in the security flags
- because the cifs module only supports sending
+ because the smbfs module only supports sending
laintext passwords using the older lanman dialect
form of the session setup SMB. (e.g. for authentication
using plain text passwords, set the SecurityFlags
@@ -762,20 +760,20 @@ cifsFYI If set to non-zero value, additional debug information
contains three flags controlling different classes of
debugging entries. The maximum value it can be set
to is 7 which enables all debugging points (default 0).
- Some debugging statements are not compiled into the
- cifs kernel unless CONFIG_CIFS_DEBUG2 is enabled in the
+ Some debugging statements are not compiled into SMBFS
+ module, unless CONFIG_SMBFS_DEBUG2 is enabled in the
kernel configuration. cifsFYI may be set to one or
nore of the following flags (7 sets them all)::

+-----------------------------------------------+------+
- | log cifs informational messages | 0x01 |
+ | log smbfs informational messages | 0x01 |
+-----------------------------------------------+------+
- | log return codes from cifs entry points | 0x02 |
+ | log return codes from smbfs entry points | 0x02 |
+-----------------------------------------------+------+
| log slow responses | 0x04 |
| (ie which take longer than 1 second) | |
| | |
- | CONFIG_CIFS_STATS2 must be enabled in .config | |
+ | CONFIG_SMBFS_STATS2 must be enabled in .config| |
+-----------------------------------------------+------+

traceSMB If set to one, debug information is logged to the
@@ -785,8 +783,8 @@ LookupCacheEnable If set to one, inode information is kept cached
for one second improving performance of lookups
(default 1)
LinuxExtensionsEnabled If set to one then the client will attempt to
- use the CIFS "UNIX" extensions which are optional
- protocol enhancements that allow CIFS servers
+ use the CIFS Unix extensions which are optional
+ protocol enhancements that allow SMB servers
to return accurate UID/GID information as well
as support symbolic links. If you use servers
such as Samba that support the CIFS Unix
@@ -799,34 +797,34 @@ dfscache List the content of the DFS cache.
======================= =======================================================

These experimental features and tracing can be enabled by changing flags in
-/proc/fs/cifs (after the cifs module has been installed or built into the
-kernel, e.g. insmod cifs). To enable a feature set it to 1 e.g. to enable
-tracing to the kernel message log type::
+/proc/fs/smbfs (after the smbfs module has been installed or built into the
+kernel). To enable a feature set it to 1 e.g. To enable tracing to the
+kernel message log type::

- echo 7 > /proc/fs/cifs/cifsFYI
+ echo 7 > /proc/fs/smbfs/cifsFYI

cifsFYI functions as a bit mask. Setting it to 1 enables additional kernel
logging of various informational messages. 2 enables logging of non-zero
SMB return codes while 4 enables logging of requests that take longer
than one second to complete (except for byte range lock requests).
-Setting it to 4 requires CONFIG_CIFS_STATS2 to be set in kernel configuration
+Setting it to 4 requires CONFIG_SMBFS_STATS2 to be set in kernel configuration
(.config). Setting it to seven enables all three. Finally, tracing
the start of smb requests and responses can be enabled via::

- echo 1 > /proc/fs/cifs/traceSMB
+ echo 1 > /proc/fs/smbfs/traceSMB

-Per share (per client mount) statistics are available in /proc/fs/cifs/Stats.
-Additional information is available if CONFIG_CIFS_STATS2 is enabled in the
+Per share (per client mount) statistics are available in /proc/fs/smbfs/Stats.
+Additional information is available if CONFIG_SMBFS_STATS2 is enabled in the
kernel configuration (.config). The statistics returned include counters which
represent the number of attempted and failed (ie non-zero return code from the
server) SMB3 (or cifs) requests grouped by request type (read, write, close etc.).
Also recorded is the total bytes read and bytes written to the server for
that share. Note that due to client caching effects this can be less than the
number of bytes read and written by the application running on the client.
-Statistics can be reset to zero by ``echo 0 > /proc/fs/cifs/Stats`` which may be
+Statistics can be reset to zero by ``echo 0 > /proc/fs/smbfs/Stats`` which may be
useful if comparing performance of two different scenarios.

-Also note that ``cat /proc/fs/cifs/DebugData`` will display information about
+Also note that ``cat /proc/fs/smbfs/DebugData`` will display information about
the active sessions and the shares that are mounted.

Enabling Kerberos (extended security) works but requires version 1.2 or later
@@ -846,23 +844,23 @@ be configured in the file /etc/request-key.conf. Samba, Windows servers and
many NAS appliances support DFS as a way of constructing a global name
space to ease network configuration and improve reliability.

-To use cifs Kerberos and DFS support, the Linux keyutils package should be
+To use SMBFS Kerberos and DFS support, the Linux keyutils package should be
installed and something like the following lines should be added to the
/etc/request-key.conf file::

create cifs.spnego * * /usr/local/sbin/cifs.upcall %k
create dns_resolver * * /usr/local/sbin/cifs.upcall %k

-CIFS kernel module parameters
+SMBFS kernel module parameters
=============================
These module parameters can be specified or modified either during the time of
module loading or during the runtime by using the interface::

- /proc/module/cifs/parameters/<param>
+ /proc/module/smbfs/parameters/<param>

i.e.::

- echo "value" > /sys/module/cifs/parameters/<param>
+ echo "value" > /sys/module/smbfs/parameters/<param>

================= ==========================================================
1. enable_oplocks Enable or disable oplocks. Oplocks are enabled by default.
diff --git a/Documentation/admin-guide/cifs/winucase_convert.pl b/Documentation/admin-guide/smbfs/winucase_convert.pl
similarity index 100%
rename from Documentation/admin-guide/cifs/winucase_convert.pl
rename to Documentation/admin-guide/smbfs/winucase_convert.pl
diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst
index bee63d42e5ec..751d8b17d289 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -72,7 +72,7 @@ Documentation for filesystem implementations.
befs
bfs
btrfs
- cifs/index
+ smbfs/index
ceph
coda
configfs
diff --git a/Documentation/filesystems/cifs/cifsroot.rst b/Documentation/filesystems/smbfs/cifsroot.rst
similarity index 85%
rename from Documentation/filesystems/cifs/cifsroot.rst
rename to Documentation/filesystems/smbfs/cifsroot.rst
index 4930bb443134..caa9b78cccf8 100644
--- a/Documentation/filesystems/cifs/cifsroot.rst
+++ b/Documentation/filesystems/smbfs/cifsroot.rst
@@ -1,15 +1,15 @@
.. SPDX-License-Identifier: GPL-2.0

===========================================
-Mounting root file system via SMB (cifs.ko)
+Mounting root file system via SMB (smbfs.ko)
===========================================

Written 2019 by Paulo Alcantara <[email protected]>

Written 2019 by Aurelien Aptel <[email protected]>

-The CONFIG_CIFS_ROOT option enables experimental root file system
-support over the SMB protocol via cifs.ko.
+The CONFIG_SMBFS_ROOT option enables experimental root file system
+support over the SMB protocol via smbfs.ko.

It introduces a new kernel command-line option called 'cifsroot='
which will tell the kernel to mount the root file system over the
@@ -19,7 +19,7 @@ In order to mount, the network stack will also need to be set up by
using 'ip=' config option. For more details, see
Documentation/admin-guide/nfs/nfsroot.rst.

-A CIFS root mount currently requires the use of SMB1+UNIX Extensions
+A SMBFS root mount currently requires the use of SMB1+UNIX Extensions
which is only supported by the Samba server. SMB1 is the older
deprecated version of the protocol but it has been extended to support
POSIX features (See [1]). The equivalent extensions for the newer
@@ -27,7 +27,7 @@ recommended version of the protocol (SMB3) have not been fully
implemented yet which means SMB3 doesn't support some required POSIX
file system objects (e.g. block devices, pipes, sockets).

-As a result, a CIFS root will default to SMB1 for now but the version
+As a result, a SMBFS root will default to SMB1 for now but the version
to use can nonetheless be changed via the 'vers=' mount option. This
default will change once the SMB3 POSIX extensions are fully
implemented.
@@ -59,7 +59,7 @@ the root file system via SMB protocol.
Enables the kernel to mount the root file system via SMB that are
located in the <server-ip> and <share> specified in this option.

-The default mount options are set in fs/cifs/cifsroot.c.
+The default mount options are set in fs/smbfs/cifsroot.c.

server-ip
IPv4 address of the server.
@@ -94,7 +94,7 @@ Restart smb service::

# systemctl restart smb

-Test it under QEMU on a kernel built with CONFIG_CIFS_ROOT and
+Test it under QEMU on a kernel built with CONFIG_SMBFS_ROOT and
CONFIG_IP_PNP options enabled::

# qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \
diff --git a/Documentation/filesystems/cifs/index.rst b/Documentation/filesystems/smbfs/index.rst
similarity index 100%
rename from Documentation/filesystems/cifs/index.rst
rename to Documentation/filesystems/smbfs/index.rst
diff --git a/Documentation/filesystems/cifs/ksmbd.rst b/Documentation/filesystems/smbfs/ksmbd.rst
similarity index 99%
rename from Documentation/filesystems/cifs/ksmbd.rst
rename to Documentation/filesystems/smbfs/ksmbd.rst
index 1af600db2e70..061471a3a4b2 100644
--- a/Documentation/filesystems/cifs/ksmbd.rst
+++ b/Documentation/filesystems/smbfs/ksmbd.rst
@@ -137,7 +137,7 @@ How to run
5. Start ksmbd user space daemon
# ksmbd.mountd

-6. Access share from Windows or Linux using CIFS
+6. Access share from Windows or Linux using SMBFS

Shutdown KSMBD
==============
diff --git a/Documentation/networking/dns_resolver.rst b/Documentation/networking/dns_resolver.rst
index add4d59a99a5..9e51a74246e7 100644
--- a/Documentation/networking/dns_resolver.rst
+++ b/Documentation/networking/dns_resolver.rst
@@ -31,7 +31,7 @@ It does not yet support the following AFS features:

(*) Dns query support for AFSDB resource record.

-This code is extracted from the CIFS filesystem.
+This code is extracted from the SMBFS filesystem.


Compilation
diff --git a/Documentation/translations/zh_CN/admin-guide/index.rst b/Documentation/translations/zh_CN/admin-guide/index.rst
index be535ffaf4b0..9f45069efaf1 100644
--- a/Documentation/translations/zh_CN/admin-guide/index.rst
+++ b/Documentation/translations/zh_CN/admin-guide/index.rst
@@ -85,7 +85,7 @@ Todolist:
* btmrvl
* cgroup-v1/index
* cgroup-v2
-* cifs/index
+* smbfs/index
* dell_rbu
* device-mapper/index
* edid
diff --git a/Documentation/translations/zh_TW/admin-guide/index.rst b/Documentation/translations/zh_TW/admin-guide/index.rst
index 293c20245783..f0c90426ba12 100644
--- a/Documentation/translations/zh_TW/admin-guide/index.rst
+++ b/Documentation/translations/zh_TW/admin-guide/index.rst
@@ -82,7 +82,7 @@ Todolist:
btmrvl
cgroup-v1/index
cgroup-v2
- cifs/index
+ smbfs/index
cputopology
dell_rbu
device-mapper/index
--
2.35.3


2022-08-01 19:31:58

by Enzo Matsumiya

[permalink] [raw]
Subject: [RFC PATCH 2/3] smbfs: rename directory "fs/cifs" -> "fs/smbfs"

Update fs/Kconfig and fs/Makefile to reflect the change.

Signed-off-by: Enzo Matsumiya <[email protected]>
---
fs/Kconfig | 2 +-
fs/Makefile | 2 +-
fs/{cifs => smbfs}/Kconfig | 0
fs/{cifs => smbfs}/Makefile | 0
fs/{cifs => smbfs}/asn1.c | 0
fs/{cifs => smbfs}/cifs_debug.c | 0
fs/{cifs => smbfs}/cifs_debug.h | 0
fs/{cifs => smbfs}/cifs_dfs_ref.c | 0
fs/{cifs => smbfs}/cifs_fs_sb.h | 0
fs/{cifs => smbfs}/cifs_ioctl.h | 0
fs/{cifs => smbfs}/cifs_spnego.c | 0
fs/{cifs => smbfs}/cifs_spnego.h | 0
fs/{cifs => smbfs}/cifs_spnego_negtokeninit.asn1 | 0
fs/{cifs => smbfs}/cifs_swn.c | 0
fs/{cifs => smbfs}/cifs_swn.h | 0
fs/{cifs => smbfs}/cifs_unicode.c | 0
fs/{cifs => smbfs}/cifs_unicode.h | 0
fs/{cifs => smbfs}/cifs_uniupr.h | 0
fs/{cifs => smbfs}/cifsacl.c | 0
fs/{cifs => smbfs}/cifsacl.h | 0
fs/{cifs => smbfs}/cifsencrypt.c | 0
fs/{cifs => smbfs}/cifsglob.h | 0
fs/{cifs => smbfs}/cifspdu.h | 0
fs/{cifs => smbfs}/cifsproto.h | 0
fs/{cifs => smbfs}/cifsroot.c | 0
fs/{cifs => smbfs}/cifssmb.c | 0
fs/{cifs => smbfs}/connect.c | 0
fs/{cifs => smbfs}/core.c | 0
fs/{cifs => smbfs}/dfs_cache.c | 0
fs/{cifs => smbfs}/dfs_cache.h | 0
fs/{cifs => smbfs}/dir.c | 0
fs/{cifs => smbfs}/dns_resolve.c | 0
fs/{cifs => smbfs}/dns_resolve.h | 0
fs/{cifs => smbfs}/export.c | 0
fs/{cifs => smbfs}/file.c | 0
fs/{cifs => smbfs}/fs_context.c | 0
fs/{cifs => smbfs}/fs_context.h | 0
fs/{cifs => smbfs}/fscache.c | 0
fs/{cifs => smbfs}/fscache.h | 0
fs/{cifs => smbfs}/inode.c | 0
fs/{cifs => smbfs}/ioctl.c | 0
fs/{cifs => smbfs}/link.c | 0
fs/{cifs => smbfs}/misc.c | 0
fs/{cifs => smbfs}/netlink.c | 0
fs/{cifs => smbfs}/netlink.h | 0
fs/{cifs => smbfs}/netmisc.c | 0
fs/{cifs => smbfs}/nterr.c | 0
fs/{cifs => smbfs}/nterr.h | 0
fs/{cifs => smbfs}/ntlmssp.h | 0
fs/{cifs => smbfs}/readdir.c | 0
fs/{cifs => smbfs}/rfc1002pdu.h | 0
fs/{cifs => smbfs}/sess.c | 0
fs/{cifs => smbfs}/smb1ops.c | 0
fs/{cifs => smbfs}/smb2file.c | 0
fs/{cifs => smbfs}/smb2glob.h | 0
fs/{cifs => smbfs}/smb2inode.c | 0
fs/{cifs => smbfs}/smb2maperror.c | 0
fs/{cifs => smbfs}/smb2misc.c | 0
fs/{cifs => smbfs}/smb2ops.c | 0
fs/{cifs => smbfs}/smb2pdu.c | 0
fs/{cifs => smbfs}/smb2pdu.h | 0
fs/{cifs => smbfs}/smb2proto.h | 0
fs/{cifs => smbfs}/smb2status.h | 0
fs/{cifs => smbfs}/smb2transport.c | 0
fs/{cifs => smbfs}/smbdirect.c | 0
fs/{cifs => smbfs}/smbdirect.h | 0
fs/{cifs => smbfs}/smbencrypt.c | 0
fs/{cifs => smbfs}/smberr.h | 0
fs/{cifs => smbfs}/smbfs.h | 0
fs/{cifs => smbfs}/trace.c | 0
fs/{cifs => smbfs}/trace.h | 0
fs/{cifs => smbfs}/transport.c | 0
fs/{cifs => smbfs}/unc.c | 0
fs/{cifs => smbfs}/winucase.c | 0
fs/{cifs => smbfs}/xattr.c | 0
75 files changed, 2 insertions(+), 2 deletions(-)
rename fs/{cifs => smbfs}/Kconfig (100%)
rename fs/{cifs => smbfs}/Makefile (100%)
rename fs/{cifs => smbfs}/asn1.c (100%)
rename fs/{cifs => smbfs}/cifs_debug.c (100%)
rename fs/{cifs => smbfs}/cifs_debug.h (100%)
rename fs/{cifs => smbfs}/cifs_dfs_ref.c (100%)
rename fs/{cifs => smbfs}/cifs_fs_sb.h (100%)
rename fs/{cifs => smbfs}/cifs_ioctl.h (100%)
rename fs/{cifs => smbfs}/cifs_spnego.c (100%)
rename fs/{cifs => smbfs}/cifs_spnego.h (100%)
rename fs/{cifs => smbfs}/cifs_spnego_negtokeninit.asn1 (100%)
rename fs/{cifs => smbfs}/cifs_swn.c (100%)
rename fs/{cifs => smbfs}/cifs_swn.h (100%)
rename fs/{cifs => smbfs}/cifs_unicode.c (100%)
rename fs/{cifs => smbfs}/cifs_unicode.h (100%)
rename fs/{cifs => smbfs}/cifs_uniupr.h (100%)
rename fs/{cifs => smbfs}/cifsacl.c (100%)
rename fs/{cifs => smbfs}/cifsacl.h (100%)
rename fs/{cifs => smbfs}/cifsencrypt.c (100%)
rename fs/{cifs => smbfs}/cifsglob.h (100%)
rename fs/{cifs => smbfs}/cifspdu.h (100%)
rename fs/{cifs => smbfs}/cifsproto.h (100%)
rename fs/{cifs => smbfs}/cifsroot.c (100%)
rename fs/{cifs => smbfs}/cifssmb.c (100%)
rename fs/{cifs => smbfs}/connect.c (100%)
rename fs/{cifs => smbfs}/core.c (100%)
rename fs/{cifs => smbfs}/dfs_cache.c (100%)
rename fs/{cifs => smbfs}/dfs_cache.h (100%)
rename fs/{cifs => smbfs}/dir.c (100%)
rename fs/{cifs => smbfs}/dns_resolve.c (100%)
rename fs/{cifs => smbfs}/dns_resolve.h (100%)
rename fs/{cifs => smbfs}/export.c (100%)
rename fs/{cifs => smbfs}/file.c (100%)
rename fs/{cifs => smbfs}/fs_context.c (100%)
rename fs/{cifs => smbfs}/fs_context.h (100%)
rename fs/{cifs => smbfs}/fscache.c (100%)
rename fs/{cifs => smbfs}/fscache.h (100%)
rename fs/{cifs => smbfs}/inode.c (100%)
rename fs/{cifs => smbfs}/ioctl.c (100%)
rename fs/{cifs => smbfs}/link.c (100%)
rename fs/{cifs => smbfs}/misc.c (100%)
rename fs/{cifs => smbfs}/netlink.c (100%)
rename fs/{cifs => smbfs}/netlink.h (100%)
rename fs/{cifs => smbfs}/netmisc.c (100%)
rename fs/{cifs => smbfs}/nterr.c (100%)
rename fs/{cifs => smbfs}/nterr.h (100%)
rename fs/{cifs => smbfs}/ntlmssp.h (100%)
rename fs/{cifs => smbfs}/readdir.c (100%)
rename fs/{cifs => smbfs}/rfc1002pdu.h (100%)
rename fs/{cifs => smbfs}/sess.c (100%)
rename fs/{cifs => smbfs}/smb1ops.c (100%)
rename fs/{cifs => smbfs}/smb2file.c (100%)
rename fs/{cifs => smbfs}/smb2glob.h (100%)
rename fs/{cifs => smbfs}/smb2inode.c (100%)
rename fs/{cifs => smbfs}/smb2maperror.c (100%)
rename fs/{cifs => smbfs}/smb2misc.c (100%)
rename fs/{cifs => smbfs}/smb2ops.c (100%)
rename fs/{cifs => smbfs}/smb2pdu.c (100%)
rename fs/{cifs => smbfs}/smb2pdu.h (100%)
rename fs/{cifs => smbfs}/smb2proto.h (100%)
rename fs/{cifs => smbfs}/smb2status.h (100%)
rename fs/{cifs => smbfs}/smb2transport.c (100%)
rename fs/{cifs => smbfs}/smbdirect.c (100%)
rename fs/{cifs => smbfs}/smbdirect.h (100%)
rename fs/{cifs => smbfs}/smbencrypt.c (100%)
rename fs/{cifs => smbfs}/smberr.h (100%)
rename fs/{cifs => smbfs}/smbfs.h (100%)
rename fs/{cifs => smbfs}/trace.c (100%)
rename fs/{cifs => smbfs}/trace.h (100%)
rename fs/{cifs => smbfs}/transport.c (100%)
rename fs/{cifs => smbfs}/unc.c (100%)
rename fs/{cifs => smbfs}/winucase.c (100%)
rename fs/{cifs => smbfs}/xattr.c (100%)

diff --git a/fs/Kconfig b/fs/Kconfig
index 860ca257c681..a069d3b82920 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -372,7 +372,7 @@ config NFS_V4_2_SSC_HELPER
source "net/sunrpc/Kconfig"
source "fs/ceph/Kconfig"

-source "fs/cifs/Kconfig"
+source "fs/smbfs/Kconfig"
source "fs/ksmbd/Kconfig"

config SMBFS_COMMON
diff --git a/fs/Makefile b/fs/Makefile
index a07039e124ce..dd9ecb89c32a 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
obj-y += unicode/
obj-$(CONFIG_SYSV_FS) += sysv/
obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
-obj-$(CONFIG_SMBFS) += cifs/
+obj-$(CONFIG_SMBFS) += smbfs/
obj-$(CONFIG_SMB_SERVER) += ksmbd/
obj-$(CONFIG_HPFS_FS) += hpfs/
obj-$(CONFIG_NTFS_FS) += ntfs/
diff --git a/fs/cifs/Kconfig b/fs/smbfs/Kconfig
similarity index 100%
rename from fs/cifs/Kconfig
rename to fs/smbfs/Kconfig
diff --git a/fs/cifs/Makefile b/fs/smbfs/Makefile
similarity index 100%
rename from fs/cifs/Makefile
rename to fs/smbfs/Makefile
diff --git a/fs/cifs/asn1.c b/fs/smbfs/asn1.c
similarity index 100%
rename from fs/cifs/asn1.c
rename to fs/smbfs/asn1.c
diff --git a/fs/cifs/cifs_debug.c b/fs/smbfs/cifs_debug.c
similarity index 100%
rename from fs/cifs/cifs_debug.c
rename to fs/smbfs/cifs_debug.c
diff --git a/fs/cifs/cifs_debug.h b/fs/smbfs/cifs_debug.h
similarity index 100%
rename from fs/cifs/cifs_debug.h
rename to fs/smbfs/cifs_debug.h
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/smbfs/cifs_dfs_ref.c
similarity index 100%
rename from fs/cifs/cifs_dfs_ref.c
rename to fs/smbfs/cifs_dfs_ref.c
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/smbfs/cifs_fs_sb.h
similarity index 100%
rename from fs/cifs/cifs_fs_sb.h
rename to fs/smbfs/cifs_fs_sb.h
diff --git a/fs/cifs/cifs_ioctl.h b/fs/smbfs/cifs_ioctl.h
similarity index 100%
rename from fs/cifs/cifs_ioctl.h
rename to fs/smbfs/cifs_ioctl.h
diff --git a/fs/cifs/cifs_spnego.c b/fs/smbfs/cifs_spnego.c
similarity index 100%
rename from fs/cifs/cifs_spnego.c
rename to fs/smbfs/cifs_spnego.c
diff --git a/fs/cifs/cifs_spnego.h b/fs/smbfs/cifs_spnego.h
similarity index 100%
rename from fs/cifs/cifs_spnego.h
rename to fs/smbfs/cifs_spnego.h
diff --git a/fs/cifs/cifs_spnego_negtokeninit.asn1 b/fs/smbfs/cifs_spnego_negtokeninit.asn1
similarity index 100%
rename from fs/cifs/cifs_spnego_negtokeninit.asn1
rename to fs/smbfs/cifs_spnego_negtokeninit.asn1
diff --git a/fs/cifs/cifs_swn.c b/fs/smbfs/cifs_swn.c
similarity index 100%
rename from fs/cifs/cifs_swn.c
rename to fs/smbfs/cifs_swn.c
diff --git a/fs/cifs/cifs_swn.h b/fs/smbfs/cifs_swn.h
similarity index 100%
rename from fs/cifs/cifs_swn.h
rename to fs/smbfs/cifs_swn.h
diff --git a/fs/cifs/cifs_unicode.c b/fs/smbfs/cifs_unicode.c
similarity index 100%
rename from fs/cifs/cifs_unicode.c
rename to fs/smbfs/cifs_unicode.c
diff --git a/fs/cifs/cifs_unicode.h b/fs/smbfs/cifs_unicode.h
similarity index 100%
rename from fs/cifs/cifs_unicode.h
rename to fs/smbfs/cifs_unicode.h
diff --git a/fs/cifs/cifs_uniupr.h b/fs/smbfs/cifs_uniupr.h
similarity index 100%
rename from fs/cifs/cifs_uniupr.h
rename to fs/smbfs/cifs_uniupr.h
diff --git a/fs/cifs/cifsacl.c b/fs/smbfs/cifsacl.c
similarity index 100%
rename from fs/cifs/cifsacl.c
rename to fs/smbfs/cifsacl.c
diff --git a/fs/cifs/cifsacl.h b/fs/smbfs/cifsacl.h
similarity index 100%
rename from fs/cifs/cifsacl.h
rename to fs/smbfs/cifsacl.h
diff --git a/fs/cifs/cifsencrypt.c b/fs/smbfs/cifsencrypt.c
similarity index 100%
rename from fs/cifs/cifsencrypt.c
rename to fs/smbfs/cifsencrypt.c
diff --git a/fs/cifs/cifsglob.h b/fs/smbfs/cifsglob.h
similarity index 100%
rename from fs/cifs/cifsglob.h
rename to fs/smbfs/cifsglob.h
diff --git a/fs/cifs/cifspdu.h b/fs/smbfs/cifspdu.h
similarity index 100%
rename from fs/cifs/cifspdu.h
rename to fs/smbfs/cifspdu.h
diff --git a/fs/cifs/cifsproto.h b/fs/smbfs/cifsproto.h
similarity index 100%
rename from fs/cifs/cifsproto.h
rename to fs/smbfs/cifsproto.h
diff --git a/fs/cifs/cifsroot.c b/fs/smbfs/cifsroot.c
similarity index 100%
rename from fs/cifs/cifsroot.c
rename to fs/smbfs/cifsroot.c
diff --git a/fs/cifs/cifssmb.c b/fs/smbfs/cifssmb.c
similarity index 100%
rename from fs/cifs/cifssmb.c
rename to fs/smbfs/cifssmb.c
diff --git a/fs/cifs/connect.c b/fs/smbfs/connect.c
similarity index 100%
rename from fs/cifs/connect.c
rename to fs/smbfs/connect.c
diff --git a/fs/cifs/core.c b/fs/smbfs/core.c
similarity index 100%
rename from fs/cifs/core.c
rename to fs/smbfs/core.c
diff --git a/fs/cifs/dfs_cache.c b/fs/smbfs/dfs_cache.c
similarity index 100%
rename from fs/cifs/dfs_cache.c
rename to fs/smbfs/dfs_cache.c
diff --git a/fs/cifs/dfs_cache.h b/fs/smbfs/dfs_cache.h
similarity index 100%
rename from fs/cifs/dfs_cache.h
rename to fs/smbfs/dfs_cache.h
diff --git a/fs/cifs/dir.c b/fs/smbfs/dir.c
similarity index 100%
rename from fs/cifs/dir.c
rename to fs/smbfs/dir.c
diff --git a/fs/cifs/dns_resolve.c b/fs/smbfs/dns_resolve.c
similarity index 100%
rename from fs/cifs/dns_resolve.c
rename to fs/smbfs/dns_resolve.c
diff --git a/fs/cifs/dns_resolve.h b/fs/smbfs/dns_resolve.h
similarity index 100%
rename from fs/cifs/dns_resolve.h
rename to fs/smbfs/dns_resolve.h
diff --git a/fs/cifs/export.c b/fs/smbfs/export.c
similarity index 100%
rename from fs/cifs/export.c
rename to fs/smbfs/export.c
diff --git a/fs/cifs/file.c b/fs/smbfs/file.c
similarity index 100%
rename from fs/cifs/file.c
rename to fs/smbfs/file.c
diff --git a/fs/cifs/fs_context.c b/fs/smbfs/fs_context.c
similarity index 100%
rename from fs/cifs/fs_context.c
rename to fs/smbfs/fs_context.c
diff --git a/fs/cifs/fs_context.h b/fs/smbfs/fs_context.h
similarity index 100%
rename from fs/cifs/fs_context.h
rename to fs/smbfs/fs_context.h
diff --git a/fs/cifs/fscache.c b/fs/smbfs/fscache.c
similarity index 100%
rename from fs/cifs/fscache.c
rename to fs/smbfs/fscache.c
diff --git a/fs/cifs/fscache.h b/fs/smbfs/fscache.h
similarity index 100%
rename from fs/cifs/fscache.h
rename to fs/smbfs/fscache.h
diff --git a/fs/cifs/inode.c b/fs/smbfs/inode.c
similarity index 100%
rename from fs/cifs/inode.c
rename to fs/smbfs/inode.c
diff --git a/fs/cifs/ioctl.c b/fs/smbfs/ioctl.c
similarity index 100%
rename from fs/cifs/ioctl.c
rename to fs/smbfs/ioctl.c
diff --git a/fs/cifs/link.c b/fs/smbfs/link.c
similarity index 100%
rename from fs/cifs/link.c
rename to fs/smbfs/link.c
diff --git a/fs/cifs/misc.c b/fs/smbfs/misc.c
similarity index 100%
rename from fs/cifs/misc.c
rename to fs/smbfs/misc.c
diff --git a/fs/cifs/netlink.c b/fs/smbfs/netlink.c
similarity index 100%
rename from fs/cifs/netlink.c
rename to fs/smbfs/netlink.c
diff --git a/fs/cifs/netlink.h b/fs/smbfs/netlink.h
similarity index 100%
rename from fs/cifs/netlink.h
rename to fs/smbfs/netlink.h
diff --git a/fs/cifs/netmisc.c b/fs/smbfs/netmisc.c
similarity index 100%
rename from fs/cifs/netmisc.c
rename to fs/smbfs/netmisc.c
diff --git a/fs/cifs/nterr.c b/fs/smbfs/nterr.c
similarity index 100%
rename from fs/cifs/nterr.c
rename to fs/smbfs/nterr.c
diff --git a/fs/cifs/nterr.h b/fs/smbfs/nterr.h
similarity index 100%
rename from fs/cifs/nterr.h
rename to fs/smbfs/nterr.h
diff --git a/fs/cifs/ntlmssp.h b/fs/smbfs/ntlmssp.h
similarity index 100%
rename from fs/cifs/ntlmssp.h
rename to fs/smbfs/ntlmssp.h
diff --git a/fs/cifs/readdir.c b/fs/smbfs/readdir.c
similarity index 100%
rename from fs/cifs/readdir.c
rename to fs/smbfs/readdir.c
diff --git a/fs/cifs/rfc1002pdu.h b/fs/smbfs/rfc1002pdu.h
similarity index 100%
rename from fs/cifs/rfc1002pdu.h
rename to fs/smbfs/rfc1002pdu.h
diff --git a/fs/cifs/sess.c b/fs/smbfs/sess.c
similarity index 100%
rename from fs/cifs/sess.c
rename to fs/smbfs/sess.c
diff --git a/fs/cifs/smb1ops.c b/fs/smbfs/smb1ops.c
similarity index 100%
rename from fs/cifs/smb1ops.c
rename to fs/smbfs/smb1ops.c
diff --git a/fs/cifs/smb2file.c b/fs/smbfs/smb2file.c
similarity index 100%
rename from fs/cifs/smb2file.c
rename to fs/smbfs/smb2file.c
diff --git a/fs/cifs/smb2glob.h b/fs/smbfs/smb2glob.h
similarity index 100%
rename from fs/cifs/smb2glob.h
rename to fs/smbfs/smb2glob.h
diff --git a/fs/cifs/smb2inode.c b/fs/smbfs/smb2inode.c
similarity index 100%
rename from fs/cifs/smb2inode.c
rename to fs/smbfs/smb2inode.c
diff --git a/fs/cifs/smb2maperror.c b/fs/smbfs/smb2maperror.c
similarity index 100%
rename from fs/cifs/smb2maperror.c
rename to fs/smbfs/smb2maperror.c
diff --git a/fs/cifs/smb2misc.c b/fs/smbfs/smb2misc.c
similarity index 100%
rename from fs/cifs/smb2misc.c
rename to fs/smbfs/smb2misc.c
diff --git a/fs/cifs/smb2ops.c b/fs/smbfs/smb2ops.c
similarity index 100%
rename from fs/cifs/smb2ops.c
rename to fs/smbfs/smb2ops.c
diff --git a/fs/cifs/smb2pdu.c b/fs/smbfs/smb2pdu.c
similarity index 100%
rename from fs/cifs/smb2pdu.c
rename to fs/smbfs/smb2pdu.c
diff --git a/fs/cifs/smb2pdu.h b/fs/smbfs/smb2pdu.h
similarity index 100%
rename from fs/cifs/smb2pdu.h
rename to fs/smbfs/smb2pdu.h
diff --git a/fs/cifs/smb2proto.h b/fs/smbfs/smb2proto.h
similarity index 100%
rename from fs/cifs/smb2proto.h
rename to fs/smbfs/smb2proto.h
diff --git a/fs/cifs/smb2status.h b/fs/smbfs/smb2status.h
similarity index 100%
rename from fs/cifs/smb2status.h
rename to fs/smbfs/smb2status.h
diff --git a/fs/cifs/smb2transport.c b/fs/smbfs/smb2transport.c
similarity index 100%
rename from fs/cifs/smb2transport.c
rename to fs/smbfs/smb2transport.c
diff --git a/fs/cifs/smbdirect.c b/fs/smbfs/smbdirect.c
similarity index 100%
rename from fs/cifs/smbdirect.c
rename to fs/smbfs/smbdirect.c
diff --git a/fs/cifs/smbdirect.h b/fs/smbfs/smbdirect.h
similarity index 100%
rename from fs/cifs/smbdirect.h
rename to fs/smbfs/smbdirect.h
diff --git a/fs/cifs/smbencrypt.c b/fs/smbfs/smbencrypt.c
similarity index 100%
rename from fs/cifs/smbencrypt.c
rename to fs/smbfs/smbencrypt.c
diff --git a/fs/cifs/smberr.h b/fs/smbfs/smberr.h
similarity index 100%
rename from fs/cifs/smberr.h
rename to fs/smbfs/smberr.h
diff --git a/fs/cifs/smbfs.h b/fs/smbfs/smbfs.h
similarity index 100%
rename from fs/cifs/smbfs.h
rename to fs/smbfs/smbfs.h
diff --git a/fs/cifs/trace.c b/fs/smbfs/trace.c
similarity index 100%
rename from fs/cifs/trace.c
rename to fs/smbfs/trace.c
diff --git a/fs/cifs/trace.h b/fs/smbfs/trace.h
similarity index 100%
rename from fs/cifs/trace.h
rename to fs/smbfs/trace.h
diff --git a/fs/cifs/transport.c b/fs/smbfs/transport.c
similarity index 100%
rename from fs/cifs/transport.c
rename to fs/smbfs/transport.c
diff --git a/fs/cifs/unc.c b/fs/smbfs/unc.c
similarity index 100%
rename from fs/cifs/unc.c
rename to fs/smbfs/unc.c
diff --git a/fs/cifs/winucase.c b/fs/smbfs/winucase.c
similarity index 100%
rename from fs/cifs/winucase.c
rename to fs/smbfs/winucase.c
diff --git a/fs/cifs/xattr.c b/fs/smbfs/xattr.c
similarity index 100%
rename from fs/cifs/xattr.c
rename to fs/smbfs/xattr.c
--
2.35.3


2022-08-02 15:32:10

by Jeffrey Layton

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Mon, 2022-08-01 at 16:09 -0300, Enzo Matsumiya wrote:
> Hi,
>
> As part of the ongoing effort to remove the "cifs" nomenclature from the
> Linux SMB client, I'm proposing the rename of the module to "smbfs".
>
> As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
> associated with the security issues it presented in the past. Using
> "SMBFS" makes clear what's the protocol in use for outsiders, but also
> unties it from any particular protocol version. It also fits in the
> already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.
>
> This short patch series only changes directory names and includes/ifdefs in
> headers and source code, and updates docs to reflect the rename. Other
> than that, no source code/functionality is modified (WIP though).
>
> Patch 1/3: effectively changes the module name to "smbfs" and create a
> "cifs" module alias to maintain compatibility (a warning
> should be added to indicate the complete removal/isolation of
> CIFS/SMB1.0 code).
> Patch 2/3: rename the source-code directory to align with the new module
> name
> Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
> "cifs module" to use the new name
>
> Enzo Matsumiya (3):
> cifs: change module name to "smbfs.ko"
> smbfs: rename directory "fs/cifs" -> "fs/smbfs"
> smbfs: update doc references
>
> Documentation/admin-guide/index.rst | 2 +-
> .../admin-guide/{cifs => smbfs}/authors.rst | 0
> .../admin-guide/{cifs => smbfs}/changes.rst | 4 +-
> .../admin-guide/{cifs => smbfs}/index.rst | 0
> .../{cifs => smbfs}/introduction.rst | 0
> .../admin-guide/{cifs => smbfs}/todo.rst | 12 +-
> .../admin-guide/{cifs => smbfs}/usage.rst | 168 +++++++++---------
> .../{cifs => smbfs}/winucase_convert.pl | 0
> Documentation/filesystems/index.rst | 2 +-
> .../filesystems/{cifs => smbfs}/cifsroot.rst | 14 +-
> .../filesystems/{cifs => smbfs}/index.rst | 0
> .../filesystems/{cifs => smbfs}/ksmbd.rst | 2 +-
> Documentation/networking/dns_resolver.rst | 2 +-
> .../translations/zh_CN/admin-guide/index.rst | 2 +-
> .../translations/zh_TW/admin-guide/index.rst | 2 +-
> fs/Kconfig | 6 +-
> fs/Makefile | 2 +-
> fs/cifs/Makefile | 34 ----
> fs/{cifs => smbfs}/Kconfig | 108 +++++------
> fs/smbfs/Makefile | 34 ++++
> fs/{cifs => smbfs}/asn1.c | 0
> fs/{cifs => smbfs}/cifs_debug.c | 72 ++++----
> fs/{cifs => smbfs}/cifs_debug.h | 4 +-
> fs/{cifs => smbfs}/cifs_dfs_ref.c | 2 +-
> fs/{cifs => smbfs}/cifs_fs_sb.h | 0
> fs/{cifs => smbfs}/cifs_ioctl.h | 0
> fs/{cifs => smbfs}/cifs_spnego.c | 4 +-
> fs/{cifs => smbfs}/cifs_spnego.h | 0
> .../cifs_spnego_negtokeninit.asn1 | 0
> fs/{cifs => smbfs}/cifs_swn.c | 0
> fs/{cifs => smbfs}/cifs_swn.h | 4 +-
> fs/{cifs => smbfs}/cifs_unicode.c | 0
> fs/{cifs => smbfs}/cifs_unicode.h | 0
> fs/{cifs => smbfs}/cifs_uniupr.h | 0
> fs/{cifs => smbfs}/cifsacl.c | 6 +-
> fs/{cifs => smbfs}/cifsacl.h | 0
> fs/{cifs => smbfs}/cifsencrypt.c | 0
> fs/{cifs => smbfs}/cifsglob.h | 26 +--
> fs/{cifs => smbfs}/cifspdu.h | 6 +-
> fs/{cifs => smbfs}/cifsproto.h | 10 +-
> fs/{cifs => smbfs}/cifsroot.c | 0
> fs/{cifs => smbfs}/cifssmb.c | 14 +-
> fs/{cifs => smbfs}/connect.c | 36 ++--
> fs/{cifs/cifsfs.c => smbfs/core.c} | 49 ++---
> fs/{cifs => smbfs}/dfs_cache.c | 2 +-
> fs/{cifs => smbfs}/dfs_cache.h | 0
> fs/{cifs => smbfs}/dir.c | 2 +-
> fs/{cifs => smbfs}/dns_resolve.c | 0
> fs/{cifs => smbfs}/dns_resolve.h | 0
> fs/{cifs => smbfs}/export.c | 8 +-
> fs/{cifs => smbfs}/file.c | 16 +-
> fs/{cifs => smbfs}/fs_context.c | 20 +--
> fs/{cifs => smbfs}/fs_context.h | 0
> fs/{cifs => smbfs}/fscache.c | 0
> fs/{cifs => smbfs}/fscache.h | 6 +-
> fs/{cifs => smbfs}/inode.c | 10 +-
> fs/{cifs => smbfs}/ioctl.c | 6 +-
> fs/{cifs => smbfs}/link.c | 2 +-
> fs/{cifs => smbfs}/misc.c | 14 +-
> fs/{cifs => smbfs}/netlink.c | 0
> fs/{cifs => smbfs}/netlink.h | 0
> fs/{cifs => smbfs}/netmisc.c | 2 +-
> fs/{cifs => smbfs}/nterr.c | 0
> fs/{cifs => smbfs}/nterr.h | 0
> fs/{cifs => smbfs}/ntlmssp.h | 2 +-
> fs/{cifs => smbfs}/readdir.c | 4 +-
> fs/{cifs => smbfs}/rfc1002pdu.h | 0
> fs/{cifs => smbfs}/sess.c | 10 +-
> fs/{cifs => smbfs}/smb1ops.c | 4 +-
> fs/{cifs => smbfs}/smb2file.c | 2 +-
> fs/{cifs => smbfs}/smb2glob.h | 0
> fs/{cifs => smbfs}/smb2inode.c | 2 +-
> fs/{cifs => smbfs}/smb2maperror.c | 0
> fs/{cifs => smbfs}/smb2misc.c | 0
> fs/{cifs => smbfs}/smb2ops.c | 32 ++--
> fs/{cifs => smbfs}/smb2pdu.c | 22 +--
> fs/{cifs => smbfs}/smb2pdu.h | 0
> fs/{cifs => smbfs}/smb2proto.h | 0
> fs/{cifs => smbfs}/smb2status.h | 0
> fs/{cifs => smbfs}/smb2transport.c | 2 +-
> fs/{cifs => smbfs}/smbdirect.c | 0
> fs/{cifs => smbfs}/smbdirect.h | 2 +-
> fs/{cifs => smbfs}/smbencrypt.c | 0
> fs/{cifs => smbfs}/smberr.h | 0
> fs/{cifs/cifsfs.h => smbfs/smbfs.h} | 12 +-
> fs/{cifs => smbfs}/trace.c | 0
> fs/{cifs => smbfs}/trace.h | 0
> fs/{cifs => smbfs}/transport.c | 4 +-
> fs/{cifs => smbfs}/unc.c | 0
> fs/{cifs => smbfs}/winucase.c | 0
> fs/{cifs => smbfs}/xattr.c | 18 +-
> 91 files changed, 414 insertions(+), 417 deletions(-)
> rename Documentation/admin-guide/{cifs => smbfs}/authors.rst (100%)
> rename Documentation/admin-guide/{cifs => smbfs}/changes.rst (73%)
> rename Documentation/admin-guide/{cifs => smbfs}/index.rst (100%)
> rename Documentation/admin-guide/{cifs => smbfs}/introduction.rst (100%)
> rename Documentation/admin-guide/{cifs => smbfs}/todo.rst (95%)
> rename Documentation/admin-guide/{cifs => smbfs}/usage.rst (87%)
> rename Documentation/admin-guide/{cifs => smbfs}/winucase_convert.pl (100%)
> rename Documentation/filesystems/{cifs => smbfs}/cifsroot.rst (85%)
> rename Documentation/filesystems/{cifs => smbfs}/index.rst (100%)
> rename Documentation/filesystems/{cifs => smbfs}/ksmbd.rst (99%)
> delete mode 100644 fs/cifs/Makefile
> rename fs/{cifs => smbfs}/Kconfig (72%)
> create mode 100644 fs/smbfs/Makefile
> rename fs/{cifs => smbfs}/asn1.c (100%)
> rename fs/{cifs => smbfs}/cifs_debug.c (96%)
> rename fs/{cifs => smbfs}/cifs_debug.h (98%)
> rename fs/{cifs => smbfs}/cifs_dfs_ref.c (99%)
> rename fs/{cifs => smbfs}/cifs_fs_sb.h (100%)
> rename fs/{cifs => smbfs}/cifs_ioctl.h (100%)
> rename fs/{cifs => smbfs}/cifs_spnego.c (98%)
> rename fs/{cifs => smbfs}/cifs_spnego.h (100%)
> rename fs/{cifs => smbfs}/cifs_spnego_negtokeninit.asn1 (100%)
> rename fs/{cifs => smbfs}/cifs_swn.c (100%)
> rename fs/{cifs => smbfs}/cifs_swn.h (95%)
> rename fs/{cifs => smbfs}/cifs_unicode.c (100%)
> rename fs/{cifs => smbfs}/cifs_unicode.h (100%)
> rename fs/{cifs => smbfs}/cifs_uniupr.h (100%)
> rename fs/{cifs => smbfs}/cifsacl.c (99%)
> rename fs/{cifs => smbfs}/cifsacl.h (100%)
> rename fs/{cifs => smbfs}/cifsencrypt.c (100%)
> rename fs/{cifs => smbfs}/cifsglob.h (99%)
> rename fs/{cifs => smbfs}/cifspdu.h (99%)
> rename fs/{cifs => smbfs}/cifsproto.h (99%)
> rename fs/{cifs => smbfs}/cifsroot.c (100%)
> rename fs/{cifs => smbfs}/cifssmb.c (99%)
> rename fs/{cifs => smbfs}/connect.c (99%)
> rename fs/{cifs/cifsfs.c => smbfs/core.c} (98%)
> rename fs/{cifs => smbfs}/dfs_cache.c (99%)
> rename fs/{cifs => smbfs}/dfs_cache.h (100%)
> rename fs/{cifs => smbfs}/dir.c (99%)
> rename fs/{cifs => smbfs}/dns_resolve.c (100%)
> rename fs/{cifs => smbfs}/dns_resolve.h (100%)
> rename fs/{cifs => smbfs}/export.c (91%)
> rename fs/{cifs => smbfs}/file.c (99%)
> rename fs/{cifs => smbfs}/fs_context.c (99%)
> rename fs/{cifs => smbfs}/fs_context.h (100%)
> rename fs/{cifs => smbfs}/fscache.c (100%)
> rename fs/{cifs => smbfs}/fscache.h (98%)
> rename fs/{cifs => smbfs}/inode.c (99%)
> rename fs/{cifs => smbfs}/ioctl.c (99%)
> rename fs/{cifs => smbfs}/link.c (99%)
> rename fs/{cifs => smbfs}/misc.c (99%)
> rename fs/{cifs => smbfs}/netlink.c (100%)
> rename fs/{cifs => smbfs}/netlink.h (100%)
> rename fs/{cifs => smbfs}/netmisc.c (99%)
> rename fs/{cifs => smbfs}/nterr.c (100%)
> rename fs/{cifs => smbfs}/nterr.h (100%)
> rename fs/{cifs => smbfs}/ntlmssp.h (98%)
> rename fs/{cifs => smbfs}/readdir.c (99%)
> rename fs/{cifs => smbfs}/rfc1002pdu.h (100%)
> rename fs/{cifs => smbfs}/sess.c (99%)
> rename fs/{cifs => smbfs}/smb1ops.c (99%)
> rename fs/{cifs => smbfs}/smb2file.c (99%)
> rename fs/{cifs => smbfs}/smb2glob.h (100%)
> rename fs/{cifs => smbfs}/smb2inode.c (99%)
> rename fs/{cifs => smbfs}/smb2maperror.c (100%)
> rename fs/{cifs => smbfs}/smb2misc.c (100%)
> rename fs/{cifs => smbfs}/smb2ops.c (99%)
> rename fs/{cifs => smbfs}/smb2pdu.c (99%)
> rename fs/{cifs => smbfs}/smb2pdu.h (100%)
> rename fs/{cifs => smbfs}/smb2proto.h (100%)
> rename fs/{cifs => smbfs}/smb2status.h (100%)
> rename fs/{cifs => smbfs}/smb2transport.c (99%)
> rename fs/{cifs => smbfs}/smbdirect.c (100%)
> rename fs/{cifs => smbfs}/smbdirect.h (99%)
> rename fs/{cifs => smbfs}/smbencrypt.c (100%)
> rename fs/{cifs => smbfs}/smberr.h (100%)
> rename fs/{cifs/cifsfs.h => smbfs/smbfs.h} (97%)
> rename fs/{cifs => smbfs}/trace.c (100%)
> rename fs/{cifs => smbfs}/trace.h (100%)
> rename fs/{cifs => smbfs}/transport.c (99%)
> rename fs/{cifs => smbfs}/unc.c (100%)
> rename fs/{cifs => smbfs}/winucase.c (100%)
> rename fs/{cifs => smbfs}/xattr.c (98%)
>


Why do this? My inclination is to say NAK here.

This seems like a lot of change for not a lot of benefit. Renaming the
directory like this pretty much guarantees that backporting patches
after this change to kernels that existed before it will be very
difficult.

Also, bear in mind that there used to be an smbfs in the kernel that
predated cifs.ko. That was removed ~2010 though, which is long enough
ago that it shouldn't produce conflicts in currently shipping releases.?
--
Jeff Layton <[email protected]>

2022-08-02 19:44:32

by Enzo Matsumiya

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On 08/02, Jeff Layton wrote:
>On Mon, 2022-08-01 at 16:09 -0300, Enzo Matsumiya wrote:
>> Hi,
>>
>> As part of the ongoing effort to remove the "cifs" nomenclature from the
>> Linux SMB client, I'm proposing the rename of the module to "smbfs".
>>
>> As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
>> associated with the security issues it presented in the past. Using
>> "SMBFS" makes clear what's the protocol in use for outsiders, but also
>> unties it from any particular protocol version. It also fits in the
>> already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.
>>
>> This short patch series only changes directory names and includes/ifdefs in
>> headers and source code, and updates docs to reflect the rename. Other
>> than that, no source code/functionality is modified (WIP though).
>>
>> Patch 1/3: effectively changes the module name to "smbfs" and create a
>> "cifs" module alias to maintain compatibility (a warning
>> should be added to indicate the complete removal/isolation of
>> CIFS/SMB1.0 code).
>> Patch 2/3: rename the source-code directory to align with the new module
>> name
>> Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
>> "cifs module" to use the new name
>>
>> Enzo Matsumiya (3):
>> cifs: change module name to "smbfs.ko"
>> smbfs: rename directory "fs/cifs" -> "fs/smbfs"
>> smbfs: update doc references
>> ...
>
>Why do this? My inclination is to say NAK here.
>
>This seems like a lot of change for not a lot of benefit. Renaming the
>directory like this pretty much guarantees that backporting patches
>after this change to kernels that existed before it will be very
>difficult.

Hi Jeff, yes that's a big concern that I've discussed internally with my
team as well, since we'll also suffer from those future backports.

But, as stated in the commit message, and from what I gathered from
Steve, it has been an ongoing wish to have the "cifs" name no longer
associated with a module handling SMB2.0 and SMB3.0, as the name brings
back old bad memories for several users.

There really is no functional benefit for this change, and I have no
argument against that.

>Also, bear in mind that there used to be an smbfs in the kernel that
>predated cifs.ko. That was removed ~2010 though, which is long enough
>ago that it shouldn't produce conflicts in currently shipping releases.?

Yes, I was aware of this before sending v1, and it got raised again in
https://lore.kernel.org/all/20220802135201.4vm36drd5mp57nvv@cyberdelia/

I have no experience on what kind of issues/problems could arise of
that, aside from the git commit history being weird. If you ever seen
any problems with that happening, please do share.

>Jeff Layton <[email protected]>

I sent a v2 with a new "fs/smb" directory name, but kept "smbfs" as the
module name.

Sorry I didn't reply to you before that, I got confused as the thread
replies all went to different folders in my mailbox.


Cheers,

Enzo

2022-08-02 20:56:20

by Jeffrey Layton

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Tue, 2022-08-02 at 16:36 -0300, Enzo Matsumiya wrote:
> On 08/02, Jeff Layton wrote:
> > On Mon, 2022-08-01 at 16:09 -0300, Enzo Matsumiya wrote:
> > > Hi,
> > >
> > > As part of the ongoing effort to remove the "cifs" nomenclature from the
> > > Linux SMB client, I'm proposing the rename of the module to "smbfs".
> > >
> > > As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
> > > associated with the security issues it presented in the past. Using
> > > "SMBFS" makes clear what's the protocol in use for outsiders, but also
> > > unties it from any particular protocol version. It also fits in the
> > > already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.
> > >
> > > This short patch series only changes directory names and includes/ifdefs in
> > > headers and source code, and updates docs to reflect the rename. Other
> > > than that, no source code/functionality is modified (WIP though).
> > >
> > > Patch 1/3: effectively changes the module name to "smbfs" and create a
> > > "cifs" module alias to maintain compatibility (a warning
> > > should be added to indicate the complete removal/isolation of
> > > CIFS/SMB1.0 code).
> > > Patch 2/3: rename the source-code directory to align with the new module
> > > name
> > > Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
> > > "cifs module" to use the new name
> > >
> > > Enzo Matsumiya (3):
> > > cifs: change module name to "smbfs.ko"
> > > smbfs: rename directory "fs/cifs" -> "fs/smbfs"
> > > smbfs: update doc references
> > > ...
> >
> > Why do this? My inclination is to say NAK here.
> >
> > This seems like a lot of change for not a lot of benefit. Renaming the
> > directory like this pretty much guarantees that backporting patches
> > after this change to kernels that existed before it will be very
> > difficult.
>
> Hi Jeff, yes that's a big concern that I've discussed internally with my
> team as well, since we'll also suffer from those future backports.
>
> But, as stated in the commit message, and from what I gathered from
> Steve, it has been an ongoing wish to have the "cifs" name no longer
> associated with a module handling SMB2.0 and SMB3.0, as the name brings
> back old bad memories for several users.
>
> There really is no functional benefit for this change, and I have no
> argument against that.
>

If the concern is "branding" then I don't see how this really helps.
Very few users interact with the kernel modules directly.

FWIW, I just called "modprobe smb3" on my workstation and got this:

[ 1223.581583] Key type cifs.spnego registered
[ 1223.582523] Key type cifs.idmap registered
[ 1230.411422] Key type cifs.idmap unregistered
[ 1230.412542] Key type cifs.spnego unregistered

Are you going to rename the keyrings too? That will have implications
for userland helper programs like cifs.upcall. There's also
/proc/fs/cifs/*.

These are a "stable interfaces" that you can't just rename at will.?If
you want to change these interfaces then you need to do a formal
deprecation announcement, and probably a period with /proc/fs/smbfs and
/proc/fs/cifs coexisting.

There are also a ton of printk's and such that have "CIFS" in them that
will need to be changed.

These costs do not seem worth the perceived benefit to me. You could
probably hide a lot of what users see by just renaming (or symlinking)
mount.cifs to mount.smb3.

I think if you guys are serious about this, you should probably start
somewhere else besides renaming the directory and module. This is going
to impact developers (and people who make their living doing backports)
far more than it will users.

> > Also, bear in mind that there used to be an smbfs in the kernel that
> > predated cifs.ko. That was removed ~2010 though, which is long enough
> > ago that it shouldn't produce conflicts in currently shipping releases.?
>
> Yes, I was aware of this before sending v1, and it got raised again in
> https://lore.kernel.org/all/20220802135201.4vm36drd5mp57nvv@cyberdelia/
>
> I have no experience on what kind of issues/problems could arise of
> that, aside from the git commit history being weird. If you ever seen
> any problems with that happening, please do share.
>

I doubt it'd be a problem in practice. If we hadn't ripped out smbfs so
long ago I'd be more concerned, but that's pretty much ancient history
now.

>
> I sent a v2 with a new "fs/smb" directory name, but kept "smbfs" as the
> module name.
>

That's a little nicer, but really the problem is the "big rename"
itself.

> Sorry I didn't reply to you before that, I got confused as the thread
> replies all went to different folders in my mailbox.
>

No worries.
--
Jeff Layton <[email protected]>

2022-08-03 01:59:08

by Tom Talpey

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On 8/2/2022 4:07 PM, Jeff Layton wrote:
> On Tue, 2022-08-02 at 16:36 -0300, Enzo Matsumiya wrote:
>> On 08/02, Jeff Layton wrote:
>>> On Mon, 2022-08-01 at 16:09 -0300, Enzo Matsumiya wrote:
>>>> Hi,
>>>>
>>>> As part of the ongoing effort to remove the "cifs" nomenclature from the
>>>> Linux SMB client, I'm proposing the rename of the module to "smbfs".
>>>>
>>>> As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
>>>> associated with the security issues it presented in the past. Using
>>>> "SMBFS" makes clear what's the protocol in use for outsiders, but also
>>>> unties it from any particular protocol version. It also fits in the
>>>> already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.
>>>>
>>>> This short patch series only changes directory names and includes/ifdefs in
>>>> headers and source code, and updates docs to reflect the rename. Other
>>>> than that, no source code/functionality is modified (WIP though).
>>>>
>>>> Patch 1/3: effectively changes the module name to "smbfs" and create a
>>>> "cifs" module alias to maintain compatibility (a warning
>>>> should be added to indicate the complete removal/isolation of
>>>> CIFS/SMB1.0 code).
>>>> Patch 2/3: rename the source-code directory to align with the new module
>>>> name
>>>> Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
>>>> "cifs module" to use the new name
>>>>
>>>> Enzo Matsumiya (3):
>>>> cifs: change module name to "smbfs.ko"
>>>> smbfs: rename directory "fs/cifs" -> "fs/smbfs"
>>>> smbfs: update doc references
>>>> ...
>>>
>>> Why do this? My inclination is to say NAK here.
>>>
>>> This seems like a lot of change for not a lot of benefit. Renaming the
>>> directory like this pretty much guarantees that backporting patches
>>> after this change to kernels that existed before it will be very
>>> difficult.
>>
>> Hi Jeff, yes that's a big concern that I've discussed internally with my
>> team as well, since we'll also suffer from those future backports.
>>
>> But, as stated in the commit message, and from what I gathered from
>> Steve, it has been an ongoing wish to have the "cifs" name no longer
>> associated with a module handling SMB2.0 and SMB3.0, as the name brings
>> back old bad memories for several users.
>>
>> There really is no functional benefit for this change, and I have no
>> argument against that.
>>
>
> If the concern is "branding" then I don't see how this really helps.
> Very few users interact with the kernel modules directly.
>
> FWIW, I just called "modprobe smb3" on my workstation and got this:
>
> [ 1223.581583] Key type cifs.spnego registered
> [ 1223.582523] Key type cifs.idmap registered
> [ 1230.411422] Key type cifs.idmap unregistered
> [ 1230.412542] Key type cifs.spnego unregistered
>
> Are you going to rename the keyrings too? That will have implications
> for userland helper programs like cifs.upcall. There's also
> /proc/fs/cifs/*.
>
> These are a "stable interfaces" that you can't just rename at will. If
> you want to change these interfaces then you need to do a formal
> deprecation announcement, and probably a period with /proc/fs/smbfs and
> /proc/fs/cifs coexisting.
>
> There are also a ton of printk's and such that have "CIFS" in them that
> will need to be changed.
>
> These costs do not seem worth the perceived benefit to me. You could
> probably hide a lot of what users see by just renaming (or symlinking)
> mount.cifs to mount.smb3.
>
> I think if you guys are serious about this, you should probably start
> somewhere else besides renaming the directory and module. This is going
> to impact developers (and people who make their living doing backports)
> far more than it will users.

The initial goal is to modularize the SMB1 code, so it can be completely
removed from a running system. The extensive refactoring logically leads
to this directory renaming, but renaming is basically a side effect.

Stamping out the four-letter word C-I-F-S is a secondary goal. At this
point, the industry has stopped using it. You make a good point that
it's still visible outside the kernel source though.

It makes good sense to do the refactoring in place, at first. Splitting
the {smb1,cifs}*.[ch] files will be more complex, but maybe easier to
review and merge, without folding in a new directory tree and git rm/mv.
Either way, there will be at least two modules, maybe three if we split
out generic subroutines.

Enzo, you're up to your elbows in this code now, is it too ugly without
the new directories?

Tom.


>>> Also, bear in mind that there used to be an smbfs in the kernel that
>>> predated cifs.ko. That was removed ~2010 though, which is long enough
>>> ago that it shouldn't produce conflicts in currently shipping releases.
>>
>> Yes, I was aware of this before sending v1, and it got raised again in
>> https://lore.kernel.org/all/20220802135201.4vm36drd5mp57nvv@cyberdelia/
>>
>> I have no experience on what kind of issues/problems could arise of
>> that, aside from the git commit history being weird. If you ever seen
>> any problems with that happening, please do share.
>>
>
> I doubt it'd be a problem in practice. If we hadn't ripped out smbfs so
> long ago I'd be more concerned, but that's pretty much ancient history
> now.
>
>>
>> I sent a v2 with a new "fs/smb" directory name, but kept "smbfs" as the
>> module name.
>>
>
> That's a little nicer, but really the problem is the "big rename"
> itself.
>
>> Sorry I didn't reply to you before that, I got confused as the thread
>> replies all went to different folders in my mailbox.
>>
>
> No worries.

2022-08-03 02:11:15

by Enzo Matsumiya

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On 08/02, Tom Talpey wrote:
>The initial goal is to modularize the SMB1 code, so it can be completely
>removed from a running system. The extensive refactoring logically leads
>to this directory renaming, but renaming is basically a side effect.
>
>Stamping out the four-letter word C-I-F-S is a secondary goal. At this
>point, the industry has stopped using it. You make a good point that
>it's still visible outside the kernel source though.
>
>It makes good sense to do the refactoring in place, at first. Splitting
>the {smb1,cifs}*.[ch] files will be more complex, but maybe easier to
>review and merge, without folding in a new directory tree and git rm/mv.
>Either way, there will be at least two modules, maybe three if we split
>out generic subroutines.
>
>Enzo, you're up to your elbows in this code now, is it too ugly without
>the new directories?

Having things in separate directories and code appropriately distributed
in coherently named headers/sources certainly makes things easier to
work with.

Of course this patch is not important, by far, but from what I
gathered, it was some people's wish to move away from "cifs" name.

Answering your question (IIUC), Tom, I'm ok with postponing this change.

>Tom.

Cheers,

Enzo

2022-08-03 05:41:07

by Steve French

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Tue, Aug 2, 2022 at 8:32 PM Tom Talpey <[email protected]> wrote:
>
> On 8/2/2022 4:07 PM, Jeff Layton wrote:
> > On Tue, 2022-08-02 at 16:36 -0300, Enzo Matsumiya wrote:
> >> On 08/02, Jeff Layton wrote:
> >>> On Mon, 2022-08-01 at 16:09 -0300, Enzo Matsumiya wrote:
> >>>> Hi,
> >>>>
> >>>> As part of the ongoing effort to remove the "cifs" nomenclature from the
> >>>> Linux SMB client, I'm proposing the rename of the module to "smbfs".
> >>>>
> >>>> As it's widely known, CIFS is associated to SMB1.0, which, in turn, is
> >>>> associated with the security issues it presented in the past. Using
> >>>> "SMBFS" makes clear what's the protocol in use for outsiders, but also
> >>>> unties it from any particular protocol version. It also fits in the
> >>>> already existing "fs/smbfs_common" and "fs/ksmbd" naming scheme.
> >>>>
> >>>> This short patch series only changes directory names and includes/ifdefs in
> >>>> headers and source code, and updates docs to reflect the rename. Other
> >>>> than that, no source code/functionality is modified (WIP though).
> >>>>
> >>>> Patch 1/3: effectively changes the module name to "smbfs" and create a
> >>>> "cifs" module alias to maintain compatibility (a warning
> >>>> should be added to indicate the complete removal/isolation of
> >>>> CIFS/SMB1.0 code).
> >>>> Patch 2/3: rename the source-code directory to align with the new module
> >>>> name
> >>>> Patch 3/3: update documentation references to "fs/cifs" or "cifs.ko" or
> >>>> "cifs module" to use the new name
> >>>>
> >>>> Enzo Matsumiya (3):
> >>>> cifs: change module name to "smbfs.ko"
> >>>> smbfs: rename directory "fs/cifs" -> "fs/smbfs"
> >>>> smbfs: update doc references
> >>>> ...
> >>>
> >>> Why do this? My inclination is to say NAK here.
> >>>
> >>> This seems like a lot of change for not a lot of benefit. Renaming the
> >>> directory like this pretty much guarantees that backporting patches
> >>> after this change to kernels that existed before it will be very
> >>> difficult.
> >>
> >> Hi Jeff, yes that's a big concern that I've discussed internally with my
> >> team as well, since we'll also suffer from those future backports.
> >>
> >> But, as stated in the commit message, and from what I gathered from
> >> Steve, it has been an ongoing wish to have the "cifs" name no longer
> >> associated with a module handling SMB2.0 and SMB3.0, as the name brings
> >> back old bad memories for several users.
> >>
> >> There really is no functional benefit for this change, and I have no
> >> argument against that.
> >>
> >
> > If the concern is "branding" then I don't see how this really helps.
> > Very few users interact with the kernel modules directly.
> >
> > FWIW, I just called "modprobe smb3" on my workstation and got this:
> >
> > [ 1223.581583] Key type cifs.spnego registered
> > [ 1223.582523] Key type cifs.idmap registered
> > [ 1230.411422] Key type cifs.idmap unregistered
> > [ 1230.412542] Key type cifs.spnego unregistered
> >
> > Are you going to rename the keyrings too? That will have implications
> > for userland helper programs like cifs.upcall. There's also
> > /proc/fs/cifs/*.
> >
> > These are a "stable interfaces" that you can't just rename at will. If
> > you want to change these interfaces then you need to do a formal
> > deprecation announcement, and probably a period with /proc/fs/smbfs and
> > /proc/fs/cifs coexisting.
> >
> > There are also a ton of printk's and such that have "CIFS" in them that
> > will need to be changed.
> >
> > These costs do not seem worth the perceived benefit to me. You could
> > probably hide a lot of what users see by just renaming (or symlinking)
> > mount.cifs to mount.smb3.
> >
> > I think if you guys are serious about this, you should probably start
> > somewhere else besides renaming the directory and module. This is going
> > to impact developers (and people who make their living doing backports)
> > far more than it will users.
>
> The initial goal is to modularize the SMB1 code, so it can be completely
> removed from a running system. The extensive refactoring logically leads
> to this directory renaming, but renaming is basically a side effect.
>
> Stamping out the four-letter word C-I-F-S is a secondary goal. At this
> point, the industry has stopped using it. You make a good point that
> it's still visible outside the kernel source though.
>
> It makes good sense to do the refactoring in place, at first. Splitting
> the {smb1,cifs}*.[ch] files will be more complex, but maybe easier to
> review and merge, without folding in a new directory tree and git rm/mv.
> Either way, there will be at least two modules, maybe three if we split
> out generic subroutines.

Yes, Tom's points make sense. The initial goal is to modularize the
smb1 (cifs) code,
and first goal is to do the refactoring in place without creating a
new directory
tree, allowing more and more of the smb1 code to be split out (currently
we can save about 10% on the module size when built with legacy disabled, but
I suspect that it will be about double that as more smb1 code is moved into
ifdefs or the smb1 specific c files).


--
Thanks,

Steve

2022-08-03 15:16:33

by Enzo Matsumiya

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On 08/02, Jeff Layton wrote:
>If the concern is "branding" then I don't see how this really helps.
>Very few users interact with the kernel modules directly.
>
>FWIW, I just called "modprobe smb3" on my workstation and got this:
>
>[ 1223.581583] Key type cifs.spnego registered
>[ 1223.582523] Key type cifs.idmap registered
>[ 1230.411422] Key type cifs.idmap unregistered
>[ 1230.412542] Key type cifs.spnego unregistered
>
>Are you going to rename the keyrings too? That will have implications
>for userland helper programs like cifs.upcall. There's also
>/proc/fs/cifs/*.
>
>These are a "stable interfaces" that you can't just rename at will.?If
>you want to change these interfaces then you need to do a formal
>deprecation announcement, and probably a period with /proc/fs/smbfs and
>/proc/fs/cifs coexisting.
>
>There are also a ton of printk's and such that have "CIFS" in them that
>will need to be changed.
>
>These costs do not seem worth the perceived benefit to me. You could
>probably hide a lot of what users see by just renaming (or symlinking)
>mount.cifs to mount.smb3.
>
>I think if you guys are serious about this, you should probably start
>somewhere else besides renaming the directory and module. This is going
>to impact developers (and people who make their living doing backports)
>far more than it will users.

I was thinking about the possible issues of a rename, and my
perspective/assessment of the impact is this:

For devs:
- from running userspace/upcall tools with "cifs" name for a while until
everything eventually catches up
- not much else, really (enlighten me here please)

For backporters/distros:
- this might *look* like an issue first, because of the name conflicts it
would arise when backporting fixes to older kernels, but these are
_just_ a rename, without any functional changes whatsoever. It could
be backported just fine as well, and customers/end users would still
see no difference in behaviour

For customers/end users:
- at first, there should be no impact. "cifs" and "smb3" modules aliases
are kept (and will be for a long while) and nothing else changes
(procfs entry, idmap/spnego upcalls, mount.cifs, etc stays the same)

A note on backports: I myself (and Paulo) do the backports for our SLE
products, sometimes down to SLE11-SP4 (based on kernel 3.0) and I
could not see what other issues could appear given if we backport this
rename to released products.

Of course, I don't know every process for every distro vendors, so if
someone could provide feedback on this, I'd appreciate.

@Paulo I'd like to hear your opinion on possible issues of future backports,
if we backported this rename patch to SLES.


Cheers,

Enzo

2022-08-03 18:15:32

by Paulo Alcantara

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

Enzo Matsumiya <[email protected]> writes:

> A note on backports: I myself (and Paulo) do the backports for our SLE
> products, sometimes down to SLE11-SP4 (based on kernel 3.0) and I
> could not see what other issues could appear given if we backport this
> rename to released products.
>
> Of course, I don't know every process for every distro vendors, so if
> someone could provide feedback on this, I'd appreciate.
>
> @Paulo I'd like to hear your opinion on possible issues of future backports,
> if we backported this rename patch to SLES.

We all know that backports aren't usually easy to deal with --
especially when doing them on very old kernels. So, if we're gonna make
them even more difficult, there must be a good reason like a new feature
or bugfix. This rename simply doesn't justify all the trouble, IMO.

Besides, for any future fixes marked for stable after this rename, it's
gonna be tricky as well. Of course, we can definitely handle them but
not worth the trouble, too.

Just to be clear, this is a NAK from me.

2022-08-04 19:14:12

by Jeffrey Layton

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Tue, 2022-08-02 at 22:56 -0300, Enzo Matsumiya wrote:
> On 08/02, Tom Talpey wrote:
> > The initial goal is to modularize the SMB1 code, so it can be completely
> > removed from a running system. The extensive refactoring logically leads
> > to this directory renaming, but renaming is basically a side effect.
> >

This is a great technical goal. Splitting up cifs.ko into smaller
modules would be great, in addition to being able to turn off smb1
support.

> > Stamping out the four-letter word C-I-F-S is a secondary goal. At this
> > point, the industry has stopped using it. You make a good point that
> > it's still visible outside the kernel source though.
> >
> > It makes good sense to do the refactoring in place, at first. Splitting
> > the {smb1,cifs}*.[ch] files will be more complex, but maybe easier to
> > review and merge, without folding in a new directory tree and git rm/mv.
> > Either way, there will be at least two modules, maybe three if we split
> > out generic subroutines.
> >
> > Enzo, you're up to your elbows in this code now, is it too ugly without
> > the new directories?
>
> Having things in separate directories and code appropriately distributed
> in coherently named headers/sources certainly makes things easier to
> work with.
>
> Of course this patch is not important, by far, but from what I
> gathered, it was some people's wish to move away from "cifs" name.
>
> Answering your question (IIUC), Tom, I'm ok with postponing this change.
>
>

Cool. I'm not even really opposed to moving the directory to a new one,
but I think a change of that magnitude ought to have some clear
technical benefit. Maybe it'll look more palatable once the breakup into
multiple modules is in place.

--
Jeff Layton <[email protected]>

2022-08-04 20:43:57

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Thu, Aug 04, 2022 at 03:03:23PM -0400, Jeff Layton wrote:
> On Tue, 2022-08-02 at 22:56 -0300, Enzo Matsumiya wrote:
> > On 08/02, Tom Talpey wrote:
> > > The initial goal is to modularize the SMB1 code, so it can be completely
> > > removed from a running system. The extensive refactoring logically leads
> > > to this directory renaming, but renaming is basically a side effect.
> > >
>
> This is a great technical goal. Splitting up cifs.ko into smaller
> modules would be great, in addition to being able to turn off smb1
> support.

I don't know the CIFS module that well. How do you see it being split
up? It's #4 in the list of filesystems:

$ size /lib/modules/5.18.0-3-amd64/kernel/fs/*/*.ko |sort -n |tail
369020 28460 132 397612 6112c /lib/modules/5.18.0-3-amd64/kernel/fs/ubifs/ubifs.ko
395793 50398 960 447151 6d2af /lib/modules/5.18.0-3-amd64/kernel/fs/ceph/ceph.ko
477909 58883 10512 547304 859e8 /lib/modules/5.18.0-3-amd64/kernel/fs/nfsd/nfsd.ko
609260 84848 640 694748 a99dc /lib/modules/5.18.0-3-amd64/kernel/fs/f2fs/f2fs.ko
622638 252078 1008 875724 d5ccc /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv4.ko
717343 111314 1176 829833 ca989 /lib/modules/5.18.0-3-amd64/kernel/fs/ext4/ext4.ko
884247 206051 504 1090802 10a4f2 /lib/modules/5.18.0-3-amd64/kernel/fs/cifs/cifs.ko
890155 159520 240 1049915 10053b /lib/modules/5.18.0-3-amd64/kernel/fs/ocfs2/ocfs2.ko
1193834 274148 456 1468438 166816 /lib/modules/5.18.0-3-amd64/kernel/fs/xfs/xfs.ko
1393088 126501 15072 1534661 176ac5 /lib/modules/5.18.0-3-amd64/kernel/fs/btrfs/btrfs.ko

... but if you look at how NFS is split up:

311322 76200 392 387914 5eb4a /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfs.ko
25157 1100 72 26329 66d9 /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv2.ko
49332 1544 120 50996 c734 /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv3.ko
622638 252078 1008 875724 d5ccc /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv4.ko

you can save a lot of RAM if you don't need NFSv4 (then there's also
nfs_common, 408kB of sunrpc.ko, etc, etc).

2022-08-04 21:20:15

by Jeffrey Layton

[permalink] [raw]
Subject: Re: [RFC PATCH 0/3] Rename "cifs" module to "smbfs"

On Thu, 2022-08-04 at 21:23 +0100, Matthew Wilcox wrote:
> On Thu, Aug 04, 2022 at 03:03:23PM -0400, Jeff Layton wrote:
> > On Tue, 2022-08-02 at 22:56 -0300, Enzo Matsumiya wrote:
> > > On 08/02, Tom Talpey wrote:
> > > > The initial goal is to modularize the SMB1 code, so it can be completely
> > > > removed from a running system. The extensive refactoring logically leads
> > > > to this directory renaming, but renaming is basically a side effect.
> > > >
> >
> > This is a great technical goal. Splitting up cifs.ko into smaller
> > modules would be great, in addition to being able to turn off smb1
> > support.
>
> I don't know the CIFS module that well. How do you see it being split
> up? It's #4 in the list of filesystems:
>

Probably by SMB protocol version, similar to how nfs.ko was split. Some
of the files are already version-specific. Some others will need to be
split up or moved into a common helper module, etc. It's not as
mechanical a change, but it would be nice to move in that direction.

To be clear for Enzo, if you have to do enough moving things around,
then it may make sense to go ahead and rename the directory too. It sort
of depends on what the final delta looks like.

> $ size /lib/modules/5.18.0-3-amd64/kernel/fs/*/*.ko |sort -n |tail
> 369020 28460 132 397612 6112c /lib/modules/5.18.0-3-amd64/kernel/fs/ubifs/ubifs.ko
> 395793 50398 960 447151 6d2af /lib/modules/5.18.0-3-amd64/kernel/fs/ceph/ceph.ko
> 477909 58883 10512 547304 859e8 /lib/modules/5.18.0-3-amd64/kernel/fs/nfsd/nfsd.ko
> 609260 84848 640 694748 a99dc /lib/modules/5.18.0-3-amd64/kernel/fs/f2fs/f2fs.ko
> 622638 252078 1008 875724 d5ccc /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv4.ko
> 717343 111314 1176 829833 ca989 /lib/modules/5.18.0-3-amd64/kernel/fs/ext4/ext4.ko
> 884247 206051 504 1090802 10a4f2 /lib/modules/5.18.0-3-amd64/kernel/fs/cifs/cifs.ko
> 890155 159520 240 1049915 10053b /lib/modules/5.18.0-3-amd64/kernel/fs/ocfs2/ocfs2.ko
> 1193834 274148 456 1468438 166816 /lib/modules/5.18.0-3-amd64/kernel/fs/xfs/xfs.ko
> 1393088 126501 15072 1534661 176ac5 /lib/modules/5.18.0-3-amd64/kernel/fs/btrfs/btrfs.ko
>
> ... but if you look at how NFS is split up:
>
> 311322 76200 392 387914 5eb4a /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfs.ko
> 25157 1100 72 26329 66d9 /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv2.ko
> 49332 1544 120 50996 c734 /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv3.ko
> 622638 252078 1008 875724 d5ccc /lib/modules/5.18.0-3-amd64/kernel/fs/nfs/nfsv4.ko
>
> you can save a lot of RAM if you don't need NFSv4 (then there's also
> nfs_common, 408kB of sunrpc.ko, etc, etc).

The memory savings is nice, but the real gain is in being able to
eventually drop SMB1 support. The SMB1 protocol is notoriously awful, so
there is legitimate interest in doing so. Moving it into a separate
module (built under a new Kconfig option) would be a great first step in
that direction.

--
Jeff Layton <[email protected]>

2023-07-26 20:45:36

by Steve French

[permalink] [raw]
Subject: Re: [RFC PATCH 1/3] cifs: change module name to "smbfs.ko"

If it is considered, I would want a much smaller version of this at
first (that limited it to the new default module name and preserving
the old one as module alias).

On Wed, Jul 26, 2023 at 3:29 PM Steve French <[email protected]> wrote:
>
> This was an old patch series I found when looking for something else.
>
> On Wed, Jul 26, 2023 at 3:28 PM Steve French <[email protected]> wrote:
> >
> > I like the idea but am curious about other's opinions.
> >
> > On Mon, Aug 1, 2022 at 2:09 PM Enzo Matsumiya <[email protected]> wrote:
> > >
> > > Rename "cifs.ko" module to "smbfs.ko", but keep "cifs" as a module alias
> > > for compatibility with existing scripts/tools.
> > >
> > > TODO: update spnego and idmap key names, cifs-utils, etc, warn about
> > > module rename
> > > To discuss: procfs entries (/proc/fs/cifs)
> > >
> > > Signed-off-by: Enzo Matsumiya <[email protected]>
> > > ---
> > > fs/Kconfig | 4 +-
> > > fs/Makefile | 2 +-
> > > fs/cifs/Kconfig | 108 +++++++++++++++++-----------------
> > > fs/cifs/Makefile | 24 ++++----
> > > fs/cifs/cifs_debug.c | 72 +++++++++++------------
> > > fs/cifs/cifs_debug.h | 4 +-
> > > fs/cifs/cifs_dfs_ref.c | 2 +-
> > > fs/cifs/cifs_spnego.c | 4 +-
> > > fs/cifs/cifs_swn.h | 4 +-
> > > fs/cifs/cifsacl.c | 6 +-
> > > fs/cifs/cifsglob.h | 26 ++++----
> > > fs/cifs/cifspdu.h | 6 +-
> > > fs/cifs/cifsproto.h | 10 ++--
> > > fs/cifs/cifssmb.c | 14 ++---
> > > fs/cifs/connect.c | 36 ++++++------
> > > fs/cifs/{cifsfs.c => core.c} | 49 +++++++--------
> > > fs/cifs/dfs_cache.c | 2 +-
> > > fs/cifs/dir.c | 2 +-
> > > fs/cifs/export.c | 8 +--
> > > fs/cifs/file.c | 16 ++---
> > > fs/cifs/fs_context.c | 20 +++----
> > > fs/cifs/fscache.h | 6 +-
> > > fs/cifs/inode.c | 10 ++--
> > > fs/cifs/ioctl.c | 6 +-
> > > fs/cifs/link.c | 2 +-
> > > fs/cifs/misc.c | 14 ++---
> > > fs/cifs/netmisc.c | 2 +-
> > > fs/cifs/ntlmssp.h | 2 +-
> > > fs/cifs/readdir.c | 4 +-
> > > fs/cifs/sess.c | 10 ++--
> > > fs/cifs/smb1ops.c | 4 +-
> > > fs/cifs/smb2file.c | 2 +-
> > > fs/cifs/smb2inode.c | 2 +-
> > > fs/cifs/smb2ops.c | 32 +++++-----
> > > fs/cifs/smb2pdu.c | 22 +++----
> > > fs/cifs/smb2transport.c | 2 +-
> > > fs/cifs/smbdirect.h | 2 +-
> > > fs/cifs/{cifsfs.h => smbfs.h} | 12 ++--
> > > fs/cifs/transport.c | 4 +-
> > > fs/cifs/xattr.c | 18 +++---
> > > 40 files changed, 287 insertions(+), 288 deletions(-)
> > > rename fs/cifs/{cifsfs.c => core.c} (98%)
> > > rename fs/cifs/{cifsfs.h => smbfs.h} (97%)
> > >
> > > diff --git a/fs/Kconfig b/fs/Kconfig
> > > index 5976eb33535f..860ca257c681 100644
> > > --- a/fs/Kconfig
> > > +++ b/fs/Kconfig
> > > @@ -377,8 +377,8 @@ source "fs/ksmbd/Kconfig"
> > >
> > > config SMBFS_COMMON
> > > tristate
> > > - default y if CIFS=y || SMB_SERVER=y
> > > - default m if CIFS=m || SMB_SERVER=m
> > > + default y if SMBFS=y || SMB_SERVER=y
> > > + default m if SMBFS=m || SMB_SERVER=m
> > >
> > > source "fs/coda/Kconfig"
> > > source "fs/afs/Kconfig"
> > > diff --git a/fs/Makefile b/fs/Makefile
> > > index 208a74e0b00e..a07039e124ce 100644
> > > --- a/fs/Makefile
> > > +++ b/fs/Makefile
> > > @@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
> > > obj-y += unicode/
> > > obj-$(CONFIG_SYSV_FS) += sysv/
> > > obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
> > > -obj-$(CONFIG_CIFS) += cifs/
> > > +obj-$(CONFIG_SMBFS) += cifs/
> > > obj-$(CONFIG_SMB_SERVER) += ksmbd/
> > > obj-$(CONFIG_HPFS_FS) += hpfs/
> > > obj-$(CONFIG_NTFS_FS) += ntfs/
> > > diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
> > > index 3b7e3b9e4fd2..c2157720ffc1 100644
> > > --- a/fs/cifs/Kconfig
> > > +++ b/fs/cifs/Kconfig
> > > @@ -1,6 +1,6 @@
> > > # SPDX-License-Identifier: GPL-2.0-only
> > > -config CIFS
> > > - tristate "SMB3 and CIFS support (advanced network filesystem)"
> > > +config SMBFS
> > > + tristate "SMBFS support (protocol versions 1, 2, and 3)"
> > > depends on INET
> > > select NLS
> > > select CRYPTO
> > > @@ -37,9 +37,9 @@ config CIFS
> > > and similar very old servers.
> > >
> > > This module provides an advanced network file system client
> > > - for mounting to SMB3 (and CIFS) compliant servers. It includes
> > > - support for DFS (hierarchical name space), secure per-user
> > > - session establishment via Kerberos or NTLM or NTLMv2, RDMA
> > > + for mounting to SMB-compliant servers. It includes support for
> > > + DFS (hierarchical name space), secure per-user session
> > > + establishment via Kerberos or NTLM or NTLMv2, RDMA
> > > (smbdirect), advanced security features, per-share encryption,
> > > directory leases, safe distributed caching (oplock), optional packet
> > > signing, Unicode and other internationalization improvements.
> > > @@ -47,29 +47,29 @@ config CIFS
> > > In general, the default dialects, SMB3 and later, enable better
> > > performance, security and features, than would be possible with CIFS.
> > > Note that when mounting to Samba, due to the CIFS POSIX extensions,
> > > - CIFS mounts can provide slightly better POSIX compatibility
> > > + SMBFS mounts can provide slightly better POSIX compatibility
> > > than SMB3 mounts. SMB2/SMB3 mount options are also
> > > slightly simpler (compared to CIFS) due to protocol improvements.
> > >
> > > If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y.
> > >
> > > -config CIFS_STATS2
> > > +config SMBFS_STATS2
> > > bool "Extended statistics"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > default y
> > > help
> > > Enabling this option will allow more detailed statistics on SMB
> > > request timing to be displayed in /proc/fs/cifs/DebugData and also
> > > allow optional logging of slow responses to dmesg (depending on the
> > > - value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/cifs/usage.rst
> > > + value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/smbfs/usage.rst
> > > for more details. These additional statistics may have a minor effect
> > > on performance and memory utilization.
> > >
> > > If unsure, say Y.
> > >
> > > -config CIFS_ALLOW_INSECURE_LEGACY
> > > +config SMBFS_ALLOW_INSECURE_LEGACY
> > > bool "Support legacy servers which use less secure dialects"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > default y
> > > help
> > > Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
> > > @@ -78,69 +78,69 @@ config CIFS_ALLOW_INSECURE_LEGACY
> > > of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.
> > >
> > > Disabling this option prevents users from using vers=1.0 or vers=2.0
> > > - on mounts with cifs.ko
> > > + on mounts with smbfs.ko
> > >
> > > If unsure, say Y.
> > >
> > > -config CIFS_UPCALL
> > > +config SMBFS_UPCALL
> > > bool "Kerberos/SPNEGO advanced session setup"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > help
> > > - Enables an upcall mechanism for CIFS which accesses userspace helper
> > > + Enables an upcall mechanism for SMBFS which accesses userspace helper
> > > utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
> > > which are needed to mount to certain secure servers (for which more
> > > secure Kerberos authentication is required). If unsure, say Y.
> > >
> > > -config CIFS_XATTR
> > > +config SMBFS_XATTR
> > > bool "CIFS extended attributes"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > help
> > > Extended attributes are name:value pairs associated with inodes by
> > > the kernel or by users (see the attr(5) manual page for details).
> > > - CIFS maps the name of extended attributes beginning with the user
> > > + SMBFS maps the name of extended attributes beginning with the user
> > > namespace prefix to SMB/CIFS EAs. EAs are stored on Windows
> > > servers without the user namespace prefix, but their names are
> > > - seen by Linux cifs clients prefaced by the user namespace prefix.
> > > + seen by Linux SMBFS clients prefaced by the user namespace prefix.
> > > The system namespace (used by some filesystems to store ACLs) is
> > > not supported at this time.
> > >
> > > If unsure, say Y.
> > >
> > > -config CIFS_POSIX
> > > - bool "CIFS POSIX Extensions"
> > > - depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
> > > +config SMBFS_POSIX
> > > + bool "SMBFS POSIX Extensions"
> > > + depends on SMBFS && SMBFS_ALLOW_INSECURE_LEGACY && SMBFS_XATTR
> > > help
> > > - Enabling this option will cause the cifs client to attempt to
> > > + Enabling this option will cause SMBFS to attempt to
> > > negotiate a newer dialect with servers, such as Samba 3.0.5
> > > or later, that optionally can handle more POSIX like (rather
> > > than Windows like) file behavior. It also enables
> > > support for POSIX ACLs (getfacl and setfacl) to servers
> > > (such as Samba 3.10 and later) which can negotiate
> > > - CIFS POSIX ACL support. If unsure, say N.
> > > + SMBFS POSIX ACL support. If unsure, say N.
> > >
> > > -config CIFS_DEBUG
> > > - bool "Enable CIFS debugging routines"
> > > +config SMBFS_DEBUG
> > > + bool "Enable SMBFS debugging routines"
> > > default y
> > > - depends on CIFS
> > > + depends on SMBFS
> > > help
> > > Enabling this option adds helpful debugging messages to
> > > - the cifs code which increases the size of the cifs module.
> > > + the SMBFS code which increases the size of the module.
> > > If unsure, say Y.
> > >
> > > -config CIFS_DEBUG2
> > > - bool "Enable additional CIFS debugging routines"
> > > - depends on CIFS_DEBUG
> > > +config SMBFS_DEBUG2
> > > + bool "Enable additional SMBFS debugging routines"
> > > + depends on SMBFS_DEBUG
> > > help
> > > Enabling this option adds a few more debugging routines
> > > - to the cifs code which slightly increases the size of
> > > - the cifs module and can cause additional logging of debug
> > > + to the SMBFS code which slightly increases the size of
> > > + the module and can cause additional logging of debug
> > > messages in some error paths, slowing performance. This
> > > option can be turned off unless you are debugging
> > > - cifs problems. If unsure, say N.
> > > + SMBFS problems. If unsure, say N.
> > >
> > > -config CIFS_DEBUG_DUMP_KEYS
> > > +config SMBFS_DEBUG_DUMP_KEYS
> > > bool "Dump encryption keys for offline decryption (Unsafe)"
> > > - depends on CIFS_DEBUG
> > > + depends on SMBFS_DEBUG
> > > help
> > > Enabling this will dump the encryption and decryption keys
> > > used to communicate on an encrypted share connection on the
> > > @@ -148,55 +148,55 @@ config CIFS_DEBUG_DUMP_KEYS
> > > encrypted network captures. Enable this carefully.
> > > If unsure, say N.
> > >
> > > -config CIFS_DFS_UPCALL
> > > +config SMBFS_DFS_UPCALL
> > > bool "DFS feature support"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > help
> > > Distributed File System (DFS) support is used to access shares
> > > transparently in an enterprise name space, even if the share
> > > moves to a different server. This feature also enables
> > > - an upcall mechanism for CIFS which contacts userspace helper
> > > + an upcall mechanism for SMBFS which contacts userspace helper
> > > utilities to provide server name resolution (host names to
> > > IP addresses) which is needed in order to reconnect to
> > > servers if their addresses change or for implicit mounts of
> > > DFS junction points. If unsure, say Y.
> > >
> > > -config CIFS_SWN_UPCALL
> > > +config SMBFS_SWN_UPCALL
> > > bool "SWN feature support"
> > > - depends on CIFS
> > > + depends on SMBFS
> > > help
> > > The Service Witness Protocol (SWN) is used to get notifications
> > > from a highly available server of resource state changes. This
> > > - feature enables an upcall mechanism for CIFS which contacts a
> > > + feature enables an upcall mechanism for SMBFS which contacts a
> > > userspace daemon to establish the DCE/RPC connection to retrieve
> > > the cluster available interfaces and resource change notifications.
> > > If unsure, say Y.
> > >
> > > -config CIFS_NFSD_EXPORT
> > > - bool "Allow nfsd to export CIFS file system"
> > > - depends on CIFS && BROKEN
> > > +config SMBFS_NFSD_EXPORT
> > > + bool "Allow nfsd to export SMBFS file system"
> > > + depends on SMBFS && BROKEN
> > > help
> > > - Allows NFS server to export a CIFS mounted share (nfsd over cifs)
> > > + Allows NFS server to export a SMBFS mounted share (nfsd over SMBFS)
> > >
> > > -config CIFS_SMB_DIRECT
> > > +config SMBFS_SMB_DIRECT
> > > bool "SMB Direct support"
> > > - depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> > > + depends on SMBFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMBFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> > > help
> > > Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
> > > SMB Direct allows transferring SMB packets over RDMA. If unsure,
> > > say Y.
> > >
> > > -config CIFS_FSCACHE
> > > - bool "Provide CIFS client caching support"
> > > - depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
> > > +config SMBFS_FSCACHE
> > > + bool "Provide SMBFS client caching support"
> > > + depends on SMBFS=m && FSCACHE || SMBFS=y && FSCACHE=y
> > > help
> > > - Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
> > > + Makes SMBFS FS-Cache capable. Say Y here if you want your SMBFS data
> > > to be cached locally on disk through the general filesystem cache
> > > manager. If unsure, say N.
> > >
> > > -config CIFS_ROOT
> > > +config SMBFS_ROOT
> > > bool "SMB root file system (Experimental)"
> > > - depends on CIFS=y && IP_PNP
> > > + depends on SMBFS=y && IP_PNP
> > > help
> > > Enables root file system support over SMB protocol.
> > >
> > > diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
> > > index 8c9f2c00be72..07096b742b1d 100644
> > > --- a/fs/cifs/Makefile
> > > +++ b/fs/cifs/Makefile
> > > @@ -1,11 +1,11 @@
> > > # SPDX-License-Identifier: GPL-2.0
> > > #
> > > -# Makefile for Linux CIFS/SMB2/SMB3 VFS client
> > > +# Makefile for Linux SMBFS VFS client
> > > #
> > > -ccflags-y += -I$(src) # needed for trace events
> > > -obj-$(CONFIG_CIFS) += cifs.o
> > > +ccflags-y += -I$(src) # needed for trace events
> > > +obj-$(CONFIG_SMBFS) += smbfs.o
> > >
> > > -cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> > > +smbfs-y := trace.o core.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> > > inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
> > > cifs_unicode.o nterr.o cifsencrypt.o \
> > > readdir.o ioctl.o sess.o export.o unc.o winucase.o \
> > > @@ -17,18 +17,18 @@ $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h
> > >
> > > $(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h
> > >
> > > -cifs-$(CONFIG_CIFS_XATTR) += xattr.o
> > > +smbfs-$(CONFIG_SMBFS_XATTR) += xattr.o
> > >
> > > -cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
> > > +smbfs-$(CONFIG_SMBFS_UPCALL) += cifs_spnego.o
> > >
> > > -cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
> > > +smbfs-$(CONFIG_SMBFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
> > >
> > > -cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
> > > +smbfs-$(CONFIG_SMBFS_SWN_UPCALL) += netlink.o cifs_swn.o
> > >
> > > -cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
> > > +smbfs-$(CONFIG_SMBFS_FSCACHE) += fscache.o
> > >
> > > -cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
> > > +smbfs-$(CONFIG_SMBFS_SMB_DIRECT) += smbdirect.o
> > >
> > > -cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
> > > +smbfs-$(CONFIG_SMBFS_ROOT) += cifsroot.o
> > >
> > > -cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> > > +smbfs-$(CONFIG_SMBFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> > > diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
> > > index 11fd85de7217..ae588a8caa90 100644
> > > --- a/fs/cifs/cifs_debug.c
> > > +++ b/fs/cifs/cifs_debug.c
> > > @@ -15,12 +15,12 @@
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > #include "cifs_debug.h"
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "fs_context.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > #include "smbdirect.h"
> > > #endif
> > > #include "cifs_swn.h"
> > > @@ -35,7 +35,7 @@ cifs_dump_mem(char *label, void *data, int length)
> > >
> > > void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> > > {
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > struct smb_hdr *smb = buf;
> > >
> > > cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
> > > @@ -43,12 +43,12 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> > > smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
> > > cifs_dbg(VFS, "smb buf %p len %u\n", smb,
> > > server->ops->calc_smb_size(smb, server));
> > > -#endif /* CONFIG_CIFS_DEBUG2 */
> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
> > > }
> > >
> > > void cifs_dump_mids(struct TCP_Server_Info *server)
> > > {
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > struct mid_q_entry *mid_entry;
> > >
> > > if (server == NULL)
> > > @@ -63,7 +63,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> > > mid_entry->pid,
> > > mid_entry->callback_data,
> > > mid_entry->mid);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
> > > mid_entry->large_buf,
> > > mid_entry->resp_buf,
> > > @@ -79,7 +79,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> > > }
> > > }
> > > spin_unlock(&server->mid_lock);
> > > -#endif /* CONFIG_CIFS_DEBUG2 */
> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
> > > }
> > >
> > > #ifdef CONFIG_PROC_FS
> > > @@ -176,7 +176,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> > > seq_puts(m, "# Version:1\n");
> > > seq_puts(m, "# Format:\n");
> > > seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>");
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > seq_printf(m, " <filename> <mid>\n");
> > > #else
> > > seq_printf(m, " <filename>\n");
> > > @@ -196,7 +196,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> > > cfile->pid,
> > > from_kuid(&init_user_ns, cfile->uid),
> > > cfile->dentry);
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > seq_printf(m, " %llu\n", cfile->fid.mid);
> > > #else
> > > seq_printf(m, "\n");
> > > @@ -225,39 +225,39 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> > > "---------------------------------------------------\n");
> > > seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
> > > seq_printf(m, "Features:");
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > seq_printf(m, " DFS");
> > > #endif
> > > -#ifdef CONFIG_CIFS_FSCACHE
> > > +#ifdef CONFIG_SMBFS_FSCACHE
> > > seq_printf(m, ",FSCACHE");
> > > #endif
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > seq_printf(m, ",SMB_DIRECT");
> > > #endif
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > seq_printf(m, ",STATS2");
> > > #else
> > > seq_printf(m, ",STATS");
> > > #endif
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > seq_printf(m, ",DEBUG2");
> > > -#elif defined(CONFIG_CIFS_DEBUG)
> > > +#elif defined(CONFIG_SMBFS_DEBUG)
> > > seq_printf(m, ",DEBUG");
> > > #endif
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > seq_printf(m, ",ALLOW_INSECURE_LEGACY");
> > > #endif
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > seq_printf(m, ",CIFS_POSIX");
> > > #endif
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > seq_printf(m, ",UPCALL(SPNEGO)");
> > > #endif
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > seq_printf(m, ",XATTR");
> > > #endif
> > > seq_printf(m, ",ACL");
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > seq_puts(m, ",WITNESS");
> > > #endif
> > > seq_putc(m, '\n');
> > > @@ -279,7 +279,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> > >
> > > if (server->hostname)
> > > seq_printf(m, "Hostname: %s ", server->hostname);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (!server->rdma)
> > > goto skip_rdma;
> > >
> > > @@ -498,12 +498,12 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > >
> > > rc = kstrtobool_from_user(buffer, count, &bv);
> > > if (rc == 0) {
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > int i;
> > >
> > > atomic_set(&total_buf_alloc_count, 0);
> > > atomic_set(&total_small_buf_alloc_count, 0);
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > > atomic_set(&tcpSesReconnectCount, 0);
> > > atomic_set(&tconInfoReconnectCount, 0);
> > >
> > > @@ -514,7 +514,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > > spin_lock(&cifs_tcp_ses_lock);
> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > > server->max_in_flight = 0;
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
> > > atomic_set(&server->num_cmds[i], 0);
> > > atomic_set(&server->smb2slowcmd[i], 0);
> > > @@ -522,7 +522,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > > server->slowest_cmd[i] = 0;
> > > server->fastest_cmd[0] = 0;
> > > }
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > > list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
> > > list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
> > > atomic_set(&tcon->num_smbs_sent, 0);
> > > @@ -546,7 +546,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > > static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > > {
> > > int i;
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > int j;
> > > #endif /* STATS2 */
> > > struct TCP_Server_Info *server;
> > > @@ -562,11 +562,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > > cifs_min_rcv + tcpSesAllocCount.counter);
> > > seq_printf(m, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
> > > small_buf_alloc_count.counter, cifs_min_small);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > seq_printf(m, "Total Large %d Small %d Allocations\n",
> > > atomic_read(&total_buf_alloc_count),
> > > atomic_read(&total_small_buf_alloc_count));
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > >
> > > seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&mid_count));
> > > seq_printf(m,
> > > @@ -581,7 +581,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > > spin_lock(&cifs_tcp_ses_lock);
> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > > seq_printf(m, "\nMax requests in flight: %d", server->max_in_flight);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > seq_puts(m, "\nTotal time spent processing by command. Time ");
> > > seq_printf(m, "units are jiffies (%d per second)\n", HZ);
> > > seq_puts(m, " SMB3 CMD\tNumber\tTotal Time\tFastest\tSlowest\n");
> > > @@ -630,7 +630,7 @@ static const struct proc_ops cifs_stats_proc_ops = {
> > > .proc_write = cifs_stats_proc_write,
> > > };
> > >
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > #define PROC_FILE_DEFINE(name) \
> > > static ssize_t name##_write(struct file *file, const char __user *buffer, \
> > > size_t count, loff_t *ppos) \
> > > @@ -702,11 +702,11 @@ cifs_proc_init(void)
> > >
> > > proc_create("mount_params", 0444, proc_fs_cifs, &cifs_mount_params_proc_ops);
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops);
> > > #endif
> > >
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > proc_create("rdma_readwrite_threshold", 0644, proc_fs_cifs,
> > > &cifs_rdma_readwrite_threshold_proc_fops);
> > > proc_create("smbd_max_frmr_depth", 0644, proc_fs_cifs,
> > > @@ -742,10 +742,10 @@ cifs_proc_clean(void)
> > > remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
> > > remove_proc_entry("mount_params", proc_fs_cifs);
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > remove_proc_entry("dfscache", proc_fs_cifs);
> > > #endif
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > remove_proc_entry("rdma_readwrite_threshold", proc_fs_cifs);
> > > remove_proc_entry("smbd_max_frmr_depth", proc_fs_cifs);
> > > remove_proc_entry("smbd_keep_alive_interval", proc_fs_cifs);
> > > @@ -972,7 +972,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
> > >
> > > cifs_security_flags_handle_must_flags(&flags);
> > >
> > > - /* flags look ok - update the global security flags for cifs module */
> > > + /* flags look ok - update global security flags */
> > > global_secflags = flags;
> > > if (global_secflags & CIFSSEC_MUST_SIGN) {
> > > /* requiring signing implies signing is allowed */
> > > diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
> > > index ee4ea2b60c0f..fd6d563b0e81 100644
> > > --- a/fs/cifs/cifs_debug.h
> > > +++ b/fs/cifs/cifs_debug.h
> > > @@ -26,7 +26,7 @@ void dump_smb(void *, int);
> > > #define VFS 1
> > > #define FYI 2
> > > extern int cifsFYI;
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > #define NOISY 4
> > > #else
> > > #define NOISY 0
> > > @@ -37,7 +37,7 @@ extern int cifsFYI;
> > > * debug ON
> > > * --------
> > > */
> > > -#ifdef CONFIG_CIFS_DEBUG
> > > +#ifdef CONFIG_SMBFS_DEBUG
> > >
> > >
> > > /*
> > > diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
> > > index b0864da9ef43..c58e67bf62f0 100644
> > > --- a/fs/cifs/cifs_dfs_ref.c
> > > +++ b/fs/cifs/cifs_dfs_ref.c
> > > @@ -18,7 +18,7 @@
> > > #include <linux/inet.h>
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "dns_resolve.h"
> > > #include "cifs_debug.h"
> > > #include "cifs_unicode.h"
> > > diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
> > > index 342717bf1dc2..fd49a1490daf 100644
> > > --- a/fs/cifs/cifs_spnego.c
> > > +++ b/fs/cifs/cifs_spnego.c
> > > @@ -161,13 +161,13 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
> > > spnego_key = request_key(&cifs_spnego_key_type, description, "");
> > > revert_creds(saved_cred);
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > if (cifsFYI && !IS_ERR(spnego_key)) {
> > > struct cifs_spnego_msg *msg = spnego_key->payload.data[0];
> > > cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024U,
> > > msg->secblob_len + msg->sesskey_len));
> > > }
> > > -#endif /* CONFIG_CIFS_DEBUG2 */
> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
> > >
> > > out:
> > > kfree(description);
> > > diff --git a/fs/cifs/cifs_swn.h b/fs/cifs/cifs_swn.h
> > > index 8a9d2a5c9077..1b9da6281131 100644
> > > --- a/fs/cifs/cifs_swn.h
> > > +++ b/fs/cifs/cifs_swn.h
> > > @@ -13,7 +13,7 @@ struct cifs_tcon;
> > > struct sk_buff;
> > > struct genl_info;
> > >
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > extern int cifs_swn_register(struct cifs_tcon *tcon);
> > >
> > > extern int cifs_swn_unregister(struct cifs_tcon *tcon);
> > > @@ -48,5 +48,5 @@ static inline void cifs_swn_check(void) {}
> > > static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
> > > static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
> > >
> > > -#endif /* CONFIG_CIFS_SWN_UPCALL */
> > > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
> > > #endif /* _CIFS_SWN_H */
> > > diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> > > index bf861fef2f0c..67e06386cfff 100644
> > > --- a/fs/cifs/cifsacl.c
> > > +++ b/fs/cifs/cifsacl.c
> > > @@ -717,7 +717,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
> > > }
> > >
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
> > > {
> > > int num_subauth;
> > > @@ -803,7 +803,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
> > >
> > > for (i = 0; i < num_aces; ++i) {
> > > ppace[i] = (struct cifs_ace *) (acl_base + acl_size);
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > dump_ace(ppace[i], end_of_acl);
> > > #endif
> > > if (mode_from_special_sid &&
> > > @@ -1162,7 +1162,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
> > > return -EINVAL;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > if (psid->num_subauth) {
> > > int i;
> > > cifs_dbg(FYI, "SID revision %d num_auth %d\n",
> > > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> > > index 3070407cafa7..58db1157d53c 100644
> > > --- a/fs/cifs/cifsglob.h
> > > +++ b/fs/cifs/cifsglob.h
> > > @@ -691,7 +691,7 @@ struct TCP_Server_Info {
> > > unsigned int total_read; /* total amount of data read in this pass */
> > > atomic_t in_send; /* requests trying to send */
> > > atomic_t num_waiters; /* blocked waiting to get in sendrecv */
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
> > > atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
> > > __u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
> > > @@ -728,11 +728,11 @@ struct TCP_Server_Info {
> > > #define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server)
> > > struct TCP_Server_Info *primary_server;
> > >
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > bool use_swn_dstaddr;
> > > struct sockaddr_storage swn_dstaddr;
> > > #endif
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > bool is_dfs_conn; /* if a dfs connection */
> > > struct mutex refpath_lock; /* protects leaf_fullpath */
> > > /*
> > > @@ -1252,14 +1252,14 @@ struct cifs_tcon {
> > > __u32 max_chunks;
> > > __u32 max_bytes_chunk;
> > > __u32 max_bytes_copy;
> > > -#ifdef CONFIG_CIFS_FSCACHE
> > > +#ifdef CONFIG_SMBFS_FSCACHE
> > > u64 resource_id; /* server resource id */
> > > struct fscache_volume *fscache; /* cookie for share */
> > > #endif
> > > struct list_head pending_opens; /* list of incomplete opens */
> > > struct cached_fid crfid; /* Cached root fid */
> > > /* BB add field for back pointer to sb struct(s)? */
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > struct list_head ulist; /* cache update list */
> > > #endif
> > > struct delayed_work query_interfaces; /* query interfaces workqueue job */
> > > @@ -1384,7 +1384,7 @@ struct cifs_fid {
> > > __u32 access;
> > > struct cifs_pending_open *pending_open;
> > > unsigned int epoch;
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > __u64 mid;
> > > #endif /* CIFS_DEBUG2 */
> > > bool purge_cache;
> > > @@ -1481,7 +1481,7 @@ struct cifs_readdata {
> > > struct iov_iter *iter);
> > > struct kvec iov[2];
> > > struct TCP_Server_Info *server;
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > struct smbd_mr *mr;
> > > #endif
> > > unsigned int pagesz;
> > > @@ -1506,7 +1506,7 @@ struct cifs_writedata {
> > > unsigned int bytes;
> > > int result;
> > > struct TCP_Server_Info *server;
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > struct smbd_mr *mr;
> > > #endif
> > > unsigned int pagesz;
> > > @@ -1689,7 +1689,7 @@ struct mid_q_entry {
> > > __u32 pid; /* process id */
> > > __u32 sequence_number; /* for CIFS signing */
> > > unsigned long when_alloc; /* when mid was created */
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > unsigned long when_sent; /* time when smb send finished */
> > > unsigned long when_received; /* when demux complete (taken off wire) */
> > > #endif
> > > @@ -1740,7 +1740,7 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
> > > atomic_dec(&server->num_waiters);
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > static inline void cifs_save_when_sent(struct mid_q_entry *mid)
> > > {
> > > mid->when_sent = jiffies;
> > > @@ -1878,7 +1878,7 @@ result of setting MUST flags more than once will be to
> > > require use of the stronger protocol */
> > > #define CIFSSEC_MUST_NTLMV2 0x04004
> > > #define CIFSSEC_MUST_KRB5 0x08008
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > #define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
> > > #else
> > > #define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
> > > @@ -2023,7 +2023,7 @@ extern atomic_t tconInfoReconnectCount;
> > > /* Various Debug counters */
> > > extern atomic_t buf_alloc_count; /* current number allocated */
> > > extern atomic_t small_buf_alloc_count;
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > extern atomic_t total_buf_alloc_count; /* total allocated over all time */
> > > extern atomic_t total_small_buf_alloc_count;
> > > extern unsigned int slow_rsp_threshold; /* number of secs before logging */
> > > @@ -2063,7 +2063,7 @@ extern mempool_t *cifs_mid_poolp;
> > > /* Operations for different SMB versions */
> > > #define SMB1_VERSION_STRING "1.0"
> > > #define SMB20_VERSION_STRING "2.0"
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > extern struct smb_version_operations smb1_operations;
> > > extern struct smb_version_values smb1_values;
> > > extern struct smb_version_operations smb20_operations;
> > > diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
> > > index aeba371c4c70..0c24fcbb6622 100644
> > > --- a/fs/cifs/cifspdu.h
> > > +++ b/fs/cifs/cifspdu.h
> > > @@ -2152,7 +2152,7 @@ typedef struct {
> > > #define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
> > > #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
> > > QFS PROXY call */
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
> > > LockingX instead of posix locking call on unix sess (and we do not expect
> > > LockingX to use different (ie Windows) semantics than posix locking on
> > > @@ -2162,7 +2162,7 @@ typedef struct {
> > > #define CIFS_UNIX_CAP_MASK 0x000003db
> > > #else
> > > #define CIFS_UNIX_CAP_MASK 0x00000013
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > >
> > >
> > > #define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
> > > @@ -2607,7 +2607,7 @@ struct data_blob {
> > > } __attribute__((packed));
> > >
> > >
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > /*
> > > For better POSIX semantics from Linux client, (even better
> > > than the existing CIFS Unix Extensions) we need updated PDUs for:
> > > diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
> > > index d59aebefa71c..fd225e5d2456 100644
> > > --- a/fs/cifs/cifsproto.h
> > > +++ b/fs/cifs/cifsproto.h
> > > @@ -9,7 +9,7 @@
> > > #define _CIFSPROTO_H
> > > #include <linux/nls.h>
> > > #include "trace.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > >
> > > @@ -284,11 +284,11 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
> > > int from_reconnect);
> > > extern void cifs_put_tcon(struct cifs_tcon *tcon);
> > >
> > > -#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
> > > +#if IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL)
> > > extern void cifs_dfs_release_automount_timer(void);
> > > -#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> > > +#else /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
> > > #define cifs_dfs_release_automount_timer() do { } while (0)
> > > -#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> > > +#endif /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
> > >
> > > void cifs_proc_init(void);
> > > void cifs_proc_clean(void);
> > > @@ -656,7 +656,7 @@ int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix);
> > > char *extract_hostname(const char *unc);
> > > char *extract_sharename(const char *unc);
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
> > > const char *old_path,
> > > const struct nls_table *nls_codepage,
> > > diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> > > index 04a4c304d004..3177fc3a2321 100644
> > > --- a/fs/cifs/cifssmb.c
> > > +++ b/fs/cifs/cifssmb.c
> > > @@ -32,11 +32,11 @@
> > > #include "smb2proto.h"
> > > #include "fscache.h"
> > > #include "smbdirect.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > >
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > static struct {
> > > int index;
> > > char *name;
> > > @@ -56,7 +56,7 @@ static struct {
> > > #endif
> > >
> > > /* define the number of elements in the cifs dialect array */
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > #define CIFS_NUM_PROT 2
> > > #else /* not posix */
> > > #define CIFS_NUM_PROT 1
> > > @@ -1528,7 +1528,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
> > > }
> > >
> > > /* how much data is in the response? */
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > use_rdma_mr = rdata->mr;
> > > #endif
> > > data_len = server->ops->read_data_length(buf, use_rdma_mr);
> > > @@ -1914,7 +1914,7 @@ cifs_writedata_release(struct kref *refcount)
> > > {
> > > struct cifs_writedata *wdata = container_of(refcount,
> > > struct cifs_writedata, refcount);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (wdata->mr) {
> > > smbd_deregister_mr(wdata->mr);
> > > wdata->mr = NULL;
> > > @@ -3360,7 +3360,7 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
> > > }
> > >
> > >
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > >
> > > /*Convert an Access Control Entry from wire format to local POSIX xattr format*/
> > > static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
> > > @@ -6054,7 +6054,7 @@ CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > /*
> > > * Do a path-based QUERY_ALL_EAS call and parse the result. This is a common
> > > * function used by listxattr and getxattr type calls. When ea_name is set,
> > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > > index 1362210f3ece..90d0254e2735 100644
> > > --- a/fs/cifs/connect.c
> > > +++ b/fs/cifs/connect.c
> > > @@ -45,7 +45,7 @@
> > > #include "smb2proto.h"
> > > #include "smbdirect.h"
> > > #include "dns_resolve.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > > #include "fs_context.h"
> > > @@ -68,7 +68,7 @@ struct mount_ctx {
> > > struct TCP_Server_Info *server;
> > > struct cifs_ses *ses;
> > > struct cifs_tcon *tcon;
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > struct cifs_ses *root_ses;
> > > uuid_t mount_id;
> > > char *origin_fullpath, *leaf_fullpath;
> > > @@ -429,7 +429,7 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > static int __reconnect_target_unlocked(struct TCP_Server_Info *server, const char *target)
> > > {
> > > int rc;
> > > @@ -841,7 +841,7 @@ is_smb_response(struct TCP_Server_Info *server, unsigned char type)
> > > void
> > > dequeue_mid(struct mid_q_entry *mid, bool malformed)
> > > {
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > mid->when_received = jiffies;
> > > #endif
> > > spin_lock(&mid->server->mid_lock);
> > > @@ -983,7 +983,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
> > > */
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > kfree(server->origin_fullpath);
> > > kfree(server->leaf_fullpath);
> > > #endif
> > > @@ -1238,7 +1238,7 @@ cifs_demultiplex_thread(void *p)
> > > cifs_dump_mem("Received Data is: ", bufs[i],
> > > HEADER_SIZE(server));
> > > smb2_add_credits_from_hdr(bufs[i], server);
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > if (server->ops->dump_detail)
> > > server->ops->dump_detail(bufs[i],
> > > server);
> > > @@ -1467,7 +1467,7 @@ cifs_find_tcp_session(struct smb3_fs_context *ctx)
> > > spin_lock(&cifs_tcp_ses_lock);
> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > > spin_lock(&server->srv_lock);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > /*
> > > * DFS failover implementation in cifs_reconnect() requires unique tcp sessions for
> > > * DFS connections to do failover properly, so avoid sharing them with regular
> > > @@ -1621,7 +1621,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> > > INIT_DELAYED_WORK(&tcp_ses->resolve, cifs_resolve_server);
> > > INIT_DELAYED_WORK(&tcp_ses->reconnect, smb2_reconnect_server);
> > > mutex_init(&tcp_ses->reconnect_mutex);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > mutex_init(&tcp_ses->refpath_lock);
> > > #endif
> > > memcpy(&tcp_ses->srcaddr, &ctx->srcaddr,
> > > @@ -1647,8 +1647,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> > > else
> > > tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
> > > if (tcp_ses->rdma) {
> > > -#ifndef CONFIG_CIFS_SMB_DIRECT
> > > - cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
> > > +#ifndef CONFIG_SMBFS_SMB_DIRECT
> > > + cifs_dbg(VFS, "CONFIG_SMBFS_SMB_DIRECT is not enabled\n");
> > > rc = -ENOENT;
> > > goto out_err_crypto_release;
> > > #endif
> > > @@ -2496,7 +2496,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
> > > }
> > >
> > > tcon->use_witness = false;
> > > - if (IS_ENABLED(CONFIG_CIFS_SWN_UPCALL) && ctx->witness) {
> > > + if (IS_ENABLED(CONFIG_SMBFS_SWN_UPCALL) && ctx->witness) {
> > > if (ses->server->vals->protocol_id >= SMB30_PROT_ID) {
> > > if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) {
> > > /*
> > > @@ -3052,7 +3052,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
> > > }
> > >
> > > cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap);
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > if (cap & CIFS_UNIX_FCNTL_CAP)
> > > cifs_dbg(FYI, "FCNTL cap\n");
> > > if (cap & CIFS_UNIX_EXTATTR_CAP)
> > > @@ -3285,7 +3285,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
> > > return 0;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > /* Get unique dfs connections */
> > > static int mount_get_dfs_conns(struct mount_ctx *mnt_ctx)
> > > {
> > > @@ -3486,7 +3486,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> > > struct cifs_tcon *tcon = mnt_ctx->tcon;
> > > struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
> > > char *full_path;
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
> > > #endif
> > >
> > > @@ -3505,7 +3505,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> > >
> > > rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
> > > full_path);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > if (nodfs) {
> > > if (rc == -EREMOTE)
> > > rc = -EOPNOTSUPP;
> > > @@ -3536,7 +3536,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > static void set_root_ses(struct mount_ctx *mnt_ctx)
> > > {
> > > if (mnt_ctx->ses) {
> > > @@ -3996,7 +3996,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
> > > spin_unlock(&cifs_sb->tlink_tree_lock);
> > >
> > > kfree(cifs_sb->prepath);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id);
> > > #endif
> > > call_rcu(&cifs_sb->rcu, delayed_free);
> > > @@ -4383,7 +4383,7 @@ cifs_prune_tlinks(struct work_struct *work)
> > > TLINK_IDLE_EXPIRE);
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > /* Update dfs referral path of superblock */
> > > static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
> > > const char *target)
> > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/core.c
> > > similarity index 98%
> > > rename from fs/cifs/cifsfs.c
> > > rename to fs/cifs/core.c
> > > index af4c5632490e..8b135c1cd5ae 100644
> > > --- a/fs/cifs/cifsfs.c
> > > +++ b/fs/cifs/core.c
> > > @@ -4,7 +4,7 @@
> > > * Copyright (C) International Business Machines Corp., 2002,2008
> > > * Author(s): Steve French ([email protected])
> > > *
> > > - * Common Internet FileSystem (CIFS) client
> > > + * SMBFS client
> > > *
> > > */
> > >
> > > @@ -28,7 +28,7 @@
> > > #include <linux/xattr.h>
> > > #include <uapi/linux/magic.h>
> > > #include <net/ipv6.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #define DECLARE_GLOBALS_HERE
> > > #include "cifsglob.h"
> > > @@ -39,10 +39,10 @@
> > > #include <linux/key-type.h>
> > > #include "cifs_spnego.h"
> > > #include "fscache.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > #include "netlink.h"
> > > #endif
> > > #include "fs_context.h"
> > > @@ -90,7 +90,7 @@ atomic_t tconInfoReconnectCount;
> > > atomic_t mid_count;
> > > atomic_t buf_alloc_count;
> > > atomic_t small_buf_alloc_count;
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > atomic_t total_buf_alloc_count;
> > > atomic_t total_small_buf_alloc_count;
> > > #endif/* STATS2 */
> > > @@ -115,7 +115,7 @@ module_param(cifs_max_pending, uint, 0444);
> > > MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server for "
> > > "CIFS/SMB1 dialect (N/A for SMB3) "
> > > "Default: 32767 Range: 2 to 32767.");
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > unsigned int slow_rsp_threshold = 1;
> > > module_param(slow_rsp_threshold, uint, 0644);
> > > MODULE_PARM_DESC(slow_rsp_threshold, "Amount of time (in seconds) to wait "
> > > @@ -266,12 +266,12 @@ cifs_read_super(struct super_block *sb)
> > > goto out_no_root;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > > if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
> > > cifs_dbg(FYI, "export ops supported\n");
> > > sb->s_export_op = &cifs_export_ops;
> > > }
> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> > >
> > > return 0;
> > >
> > > @@ -759,7 +759,7 @@ static void cifs_umount_begin(struct super_block *sb)
> > > return;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > static int cifs_show_stats(struct seq_file *s, struct dentry *root)
> > > {
> > > /* BB FIXME */
> > > @@ -797,7 +797,7 @@ static const struct super_operations cifs_super_ops = {
> > > as opens */
> > > .show_options = cifs_show_options,
> > > .umount_begin = cifs_umount_begin,
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > .show_stats = cifs_show_stats,
> > > #endif
> > > };
> > > @@ -1116,6 +1116,7 @@ struct file_system_type cifs_fs_type = {
> > > .fs_flags = FS_RENAME_DOES_D_MOVE,
> > > };
> > > MODULE_ALIAS_FS("cifs");
> > > +MODULE_ALIAS("cifs");
> > >
> > > struct file_system_type smb3_fs_type = {
> > > .owner = THIS_MODULE,
> > > @@ -1612,7 +1613,7 @@ init_cifs(void)
> > >
> > > atomic_set(&buf_alloc_count, 0);
> > > atomic_set(&small_buf_alloc_count, 0);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > atomic_set(&total_buf_alloc_count, 0);
> > > atomic_set(&total_small_buf_alloc_count, 0);
> > > if (slow_rsp_threshold < 1)
> > > @@ -1620,7 +1621,7 @@ init_cifs(void)
> > > else if (slow_rsp_threshold > 32767)
> > > cifs_dbg(VFS,
> > > "slow response threshold set higher than recommended (0 to 32767)\n");
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > >
> > > atomic_set(&mid_count, 0);
> > > GlobalCurrentXid = 0;
> > > @@ -1693,21 +1694,21 @@ init_cifs(void)
> > > if (rc)
> > > goto out_destroy_mids;
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > rc = dfs_cache_init();
> > > if (rc)
> > > goto out_destroy_request_bufs;
> > > -#endif /* CONFIG_CIFS_DFS_UPCALL */
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#endif /* CONFIG_SMBFS_DFS_UPCALL */
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > rc = init_cifs_spnego();
> > > if (rc)
> > > goto out_destroy_dfs_cache;
> > > -#endif /* CONFIG_CIFS_UPCALL */
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#endif /* CONFIG_SMBFS_UPCALL */
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > rc = cifs_genl_init();
> > > if (rc)
> > > goto out_register_key_type;
> > > -#endif /* CONFIG_CIFS_SWN_UPCALL */
> > > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
> > >
> > > rc = init_cifs_idmap();
> > > if (rc)
> > > @@ -1728,15 +1729,15 @@ init_cifs(void)
> > > out_init_cifs_idmap:
> > > exit_cifs_idmap();
> > > out_cifs_swn_init:
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > cifs_genl_exit();
> > > out_register_key_type:
> > > #endif
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > exit_cifs_spnego();
> > > out_destroy_dfs_cache:
> > > #endif
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > dfs_cache_destroy();
> > > out_destroy_request_bufs:
> > > #endif
> > > @@ -1768,13 +1769,13 @@ exit_cifs(void)
> > > unregister_filesystem(&smb3_fs_type);
> > > cifs_dfs_release_automount_timer();
> > > exit_cifs_idmap();
> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > > cifs_genl_exit();
> > > #endif
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > exit_cifs_spnego();
> > > #endif
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > dfs_cache_destroy();
> > > #endif
> > > cifs_destroy_request_bufs();
> > > diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> > > index a9b6c3eba6de..f0d2d2c49f9e 100644
> > > --- a/fs/cifs/dfs_cache.c
> > > +++ b/fs/cifs/dfs_cache.c
> > > @@ -334,7 +334,7 @@ const struct proc_ops dfscache_proc_ops = {
> > > .proc_write = dfscache_proc_write,
> > > };
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > static inline void dump_tgts(const struct cache_entry *ce)
> > > {
> > > struct cache_dfs_tgt *t;
> > > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> > > index ce9b22aecfba..5b3728631552 100644
> > > --- a/fs/cifs/dir.c
> > > +++ b/fs/cifs/dir.c
> > > @@ -13,7 +13,7 @@
> > > #include <linux/namei.h>
> > > #include <linux/mount.h>
> > > #include <linux/file.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > diff --git a/fs/cifs/export.c b/fs/cifs/export.c
> > > index 37c28415df1e..0395ef73b06d 100644
> > > --- a/fs/cifs/export.c
> > > +++ b/fs/cifs/export.c
> > > @@ -4,8 +4,6 @@
> > > * Copyright (C) International Business Machines Corp., 2007
> > > * Author(s): Steve French ([email protected])
> > > *
> > > - * Common Internet FileSystem (CIFS) client
> > > - *
> > > * Operations related to support for exporting files via NFSD
> > > *
> > > */
> > > @@ -30,9 +28,9 @@
> > > #include <linux/exportfs.h>
> > > #include "cifsglob.h"
> > > #include "cifs_debug.h"
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > >
> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > > static struct dentry *cifs_get_parent(struct dentry *dentry)
> > > {
> > > /* BB need to add code here eventually to enable export via NFSD */
> > > @@ -50,5 +48,5 @@ const struct export_operations cifs_export_ops = {
> > > .encode_fs = */
> > > };
> > >
> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> > >
> > > diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> > > index a592fdf04313..90567ae51fa7 100644
> > > --- a/fs/cifs/file.c
> > > +++ b/fs/cifs/file.c
> > > @@ -22,7 +22,7 @@
> > > #include <linux/swap.h>
> > > #include <linux/mm.h>
> > > #include <asm/div64.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > @@ -2942,7 +2942,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
> > > if (wdata->cfile->invalidHandle)
> > > rc = -EAGAIN;
> > > else {
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (wdata->mr) {
> > > wdata->mr->need_invalidate = true;
> > > smbd_deregister_mr(wdata->mr);
> > > @@ -3455,7 +3455,7 @@ cifs_readdata_release(struct kref *refcount)
> > > {
> > > struct cifs_readdata *rdata = container_of(refcount,
> > > struct cifs_readdata, refcount);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (rdata->mr) {
> > > smbd_deregister_mr(rdata->mr);
> > > rdata->mr = NULL;
> > > @@ -3599,7 +3599,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
> > > if (iter)
> > > result = copy_page_from_iter(
> > > page, page_offset, n, iter);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > else if (rdata->mr)
> > > result = n;
> > > #endif
> > > @@ -3676,7 +3676,7 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
> > > if (rdata->cfile->invalidHandle)
> > > rc = -EAGAIN;
> > > else {
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (rdata->mr) {
> > > rdata->mr->need_invalidate = true;
> > > smbd_deregister_mr(rdata->mr);
> > > @@ -4212,7 +4212,7 @@ cifs_page_mkwrite(struct vm_fault *vmf)
> > > /* Wait for the page to be written to the cache before we allow it to
> > > * be modified. We then assume the entire page will need writing back.
> > > */
> > > -#ifdef CONFIG_CIFS_FSCACHE
> > > +#ifdef CONFIG_SMBFS_FSCACHE
> > > if (PageFsCache(page) &&
> > > wait_on_page_fscache_killable(page) < 0)
> > > return VM_FAULT_RETRY;
> > > @@ -4367,7 +4367,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
> > > if (iter)
> > > result = copy_page_from_iter(
> > > page, page_offset, n, iter);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > else if (rdata->mr)
> > > result = n;
> > > #endif
> > > @@ -4960,7 +4960,7 @@ static void cifs_swap_deactivate(struct file *file)
> > > * Mark a page as having been made dirty and thus needing writeback. We also
> > > * need to pin the cache object to write back to.
> > > */
> > > -#ifdef CONFIG_CIFS_FSCACHE
> > > +#ifdef CONFIG_SMBFS_FSCACHE
> > > static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
> > > {
> > > return fscache_dirty_folio(mapping, folio,
> > > diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> > > index 8dc0d923ef6a..a8366986bf73 100644
> > > --- a/fs/cifs/fs_context.c
> > > +++ b/fs/cifs/fs_context.c
> > > @@ -13,7 +13,7 @@
> > > #include <linux/magic.h>
> > > #include <linux/security.h>
> > > #include <net/net_namespace.h>
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > > */
> > > @@ -25,7 +25,7 @@
> > > #include <linux/mount.h>
> > > #include <linux/parser.h>
> > > #include <linux/utsname.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > @@ -339,7 +339,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
> > > substring_t args[MAX_OPT_ARGS];
> > >
> > > switch (match_token(value, cifs_smb_version_tokens, args)) {
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > case Smb_1:
> > > if (disable_legacy_dialects) {
> > > cifs_errorf(fc, "mount with legacy dialect disabled\n");
> > > @@ -825,7 +825,7 @@ static int smb3_reconfigure(struct fs_context *fc)
> > > smb3_cleanup_fs_context_contents(cifs_sb->ctx);
> > > rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
> > > smb3_update_mnt_flags(cifs_sb);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > if (!rc)
> > > rc = dfs_cache_remount_fs(cifs_sb);
> > > #endif
> > > @@ -1291,16 +1291,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> > > goto cifs_parse_mount_err;
> > > break;
> > > case Opt_witness:
> > > -#ifndef CONFIG_CIFS_SWN_UPCALL
> > > - cifs_errorf(fc, "Witness support needs CONFIG_CIFS_SWN_UPCALL config option\n");
> > > +#ifndef CONFIG_SMBFS_SWN_UPCALL
> > > + cifs_errorf(fc, "Witness support needs CONFIG_SMBFS_SWN_UPCALL config option\n");
> > > goto cifs_parse_mount_err;
> > > #endif
> > > ctx->witness = true;
> > > pr_warn_once("Witness protocol support is experimental\n");
> > > break;
> > > case Opt_rootfs:
> > > -#ifndef CONFIG_CIFS_ROOT
> > > - cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
> > > +#ifndef CONFIG_SMBFS_ROOT
> > > + cifs_dbg(VFS, "rootfs support requires CONFIG_SMBFS_ROOT config option\n");
> > > goto cifs_parse_mount_err;
> > > #endif
> > > ctx->rootfs = true;
> > > @@ -1399,8 +1399,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> > > pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
> > > break;
> > > case Opt_fsc:
> > > -#ifndef CONFIG_CIFS_FSCACHE
> > > - cifs_errorf(fc, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n");
> > > +#ifndef CONFIG_SMBFS_FSCACHE
> > > + cifs_errorf(fc, "FS-Cache support needs CONFIG_SMBFS_FSCACHE kernel config option set\n");
> > > goto cifs_parse_mount_err;
> > > #endif
> > > ctx->fsc = true;
> > > diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
> > > index aa3b941a5555..ac2e5eb01af5 100644
> > > --- a/fs/cifs/fscache.h
> > > +++ b/fs/cifs/fscache.h
> > > @@ -33,7 +33,7 @@ struct cifs_fscache_inode_coherency_data {
> > > __le32 last_change_time_nsec;
> > > };
> > >
> > > -#ifdef CONFIG_CIFS_FSCACHE
> > > +#ifdef CONFIG_SMBFS_FSCACHE
> > >
> > > /*
> > > * fscache.c
> > > @@ -119,7 +119,7 @@ static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
> > > return true;
> > > }
> > >
> > > -#else /* CONFIG_CIFS_FSCACHE */
> > > +#else /* CONFIG_SMBFS_FSCACHE */
> > > static inline
> > > void cifs_fscache_fill_coherency(struct inode *inode,
> > > struct cifs_fscache_inode_coherency_data *cd)
> > > @@ -159,6 +159,6 @@ static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
> > > return true; /* May release page */
> > > }
> > >
> > > -#endif /* CONFIG_CIFS_FSCACHE */
> > > +#endif /* CONFIG_SMBFS_FSCACHE */
> > >
> > > #endif /* _CIFS_FSCACHE_H */
> > > diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> > > index 3ad303dd5e5a..9da2c5644960 100644
> > > --- a/fs/cifs/inode.c
> > > +++ b/fs/cifs/inode.c
> > > @@ -14,7 +14,7 @@
> > > #include <linux/wait_bit.h>
> > > #include <linux/fiemap.h>
> > > #include <asm/div64.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > @@ -57,7 +57,7 @@ static void cifs_set_ops(struct inode *inode)
> > > inode->i_data.a_ops = &cifs_addr_ops;
> > > break;
> > > case S_IFDIR:
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > if (IS_AUTOMOUNT(inode)) {
> > > inode->i_op = &cifs_dfs_referral_inode_operations;
> > > } else {
> > > @@ -552,7 +552,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
> > > static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
> > > struct cifs_sb_info *cifs_sb, unsigned int xid)
> > > {
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > ssize_t rc;
> > > char ea_value[4];
> > > __u32 mode;
> > > @@ -956,7 +956,7 @@ cifs_get_inode_info(struct inode **inode,
> > > rc = server->ops->query_path_info(xid, tcon, cifs_sb,
> > > full_path, tmp_data,
> > > &adjust_tz, &is_reparse_point);
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > if (rc == -ENOENT && is_tcon_dfs(tcon))
> > > rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon,
> > > cifs_sb,
> > > @@ -1833,7 +1833,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,
> > >
> > > d_instantiate(dentry, newinode);
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > cifs_dbg(FYI, "instantiated dentry %p %pd to inode %p\n",
> > > dentry, dentry, newinode);
> > >
> > > diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
> > > index 0359b604bdbc..01f70c5352fd 100644
> > > --- a/fs/cifs/ioctl.c
> > > +++ b/fs/cifs/ioctl.c
> > > @@ -17,7 +17,7 @@
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > #include "cifs_debug.h"
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifs_ioctl.h"
> > > #include "smb2proto.h"
> > > #include "smb2glob.h"
> > > @@ -332,7 +332,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> > > break;
> > > tcon = tlink_tcon(pSMBFile->tlink);
> > > caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > if (CIFS_UNIX_EXTATTR_CAP & caps) {
> > > __u64 ExtAttrMask = 0;
> > > rc = CIFSGetExtAttr(xid, tcon,
> > > @@ -345,7 +345,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> > > if (rc != EOPNOTSUPP)
> > > break;
> > > }
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > > rc = 0;
> > > if (CIFS_I(inode)->cifsAttrs & ATTR_COMPRESSED) {
> > > /* add in the compressed bit */
> > > diff --git a/fs/cifs/link.c b/fs/cifs/link.c
> > > index bbdf3281559c..640a8724ac8e 100644
> > > --- a/fs/cifs/link.c
> > > +++ b/fs/cifs/link.c
> > > @@ -9,7 +9,7 @@
> > > #include <linux/stat.h>
> > > #include <linux/slab.h>
> > > #include <linux/namei.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
> > > index 7a906067db04..5b03978e658c 100644
> > > --- a/fs/cifs/misc.c
> > > +++ b/fs/cifs/misc.c
> > > @@ -18,8 +18,8 @@
> > > #include "nterr.h"
> > > #include "cifs_unicode.h"
> > > #include "smb2pdu.h"
> > > -#include "cifsfs.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#include "smbfs.h"
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dns_resolve.h"
> > > #endif
> > > #include "fs_context.h"
> > > @@ -175,9 +175,9 @@ cifs_buf_get(void)
> > > /* for most paths, more is cleared in header_assemble */
> > > memset(ret_buf, 0, buf_size + 3);
> > > atomic_inc(&buf_alloc_count);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > atomic_inc(&total_buf_alloc_count);
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > >
> > > return ret_buf;
> > > }
> > > @@ -208,9 +208,9 @@ cifs_small_buf_get(void)
> > > /* No need to clear memory here, cleared in header assemble */
> > > /* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
> > > atomic_inc(&small_buf_alloc_count);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > atomic_inc(&total_small_buf_alloc_count);
> > > -#endif /* CONFIG_CIFS_STATS2 */
> > > +#endif /* CONFIG_SMBFS_STATS2 */
> > >
> > > return ret_buf;
> > > }
> > > @@ -1246,7 +1246,7 @@ void cifs_put_tcp_super(struct super_block *sb)
> > > __cifs_put_super(sb);
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > int match_target_ip(struct TCP_Server_Info *server,
> > > const char *share, size_t share_len,
> > > bool *result)
> > > diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
> > > index 28caae7aed1b..8d461b29c0e2 100644
> > > --- a/fs/cifs/netmisc.c
> > > +++ b/fs/cifs/netmisc.c
> > > @@ -16,7 +16,7 @@
> > > #include <asm/div64.h>
> > > #include <asm/byteorder.h>
> > > #include <linux/inet.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
> > > index 55758b9ec877..d22bf9591c3c 100644
> > > --- a/fs/cifs/ntlmssp.h
> > > +++ b/fs/cifs/ntlmssp.h
> > > @@ -93,7 +93,7 @@ typedef struct _NEGOTIATE_MESSAGE {
> > > struct ntlmssp_version {
> > > __u8 ProductMajorVersion;
> > > __u8 ProductMinorVersion;
> > > - __le16 ProductBuild; /* we send the cifs.ko module version here */
> > > + __le16 ProductBuild; /* we send the module version here */
> > > __u8 Reserved[3];
> > > __u8 NTLMRevisionCurrent; /* currently 0x0F */
> > > } __packed;
> > > diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
> > > index 384cabdf47ca..acfe26e3ec0e 100644
> > > --- a/fs/cifs/readdir.c
> > > +++ b/fs/cifs/readdir.c
> > > @@ -18,7 +18,7 @@
> > > #include "cifs_unicode.h"
> > > #include "cifs_debug.h"
> > > #include "cifs_fs_sb.h"
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "smb2proto.h"
> > > #include "fs_context.h"
> > >
> > > @@ -29,7 +29,7 @@
> > > */
> > > #define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2)
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > static void dump_cifs_file_struct(struct file *file, char *label)
> > > {
> > > struct cifsFileInfo *cf;
> > > diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> > > index 02c8b2906196..a6288850c7cc 100644
> > > --- a/fs/cifs/sess.c
> > > +++ b/fs/cifs/sess.c
> > > @@ -18,7 +18,7 @@
> > > #include <linux/utsname.h>
> > > #include <linux/slab.h>
> > > #include <linux/version.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifs_spnego.h"
> > > #include "smb2proto.h"
> > > #include "fs_context.h"
> > > @@ -1376,7 +1376,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data)
> > > ses->auth_key.response = NULL;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > static void
> > > sess_auth_kerberos(struct sess_data *sess_data)
> > > {
> > > @@ -1515,7 +1515,7 @@ sess_auth_kerberos(struct sess_data *sess_data)
> > > ses->auth_key.response = NULL;
> > > }
> > >
> > > -#endif /* ! CONFIG_CIFS_UPCALL */
> > > +#endif /* ! CONFIG_SMBFS_UPCALL */
> > >
> > > /*
> > > * The required kvec buffers have to be allocated before calling this
> > > @@ -1792,13 +1792,13 @@ static int select_sec(struct sess_data *sess_data)
> > > sess_data->func = sess_auth_ntlmv2;
> > > break;
> > > case Kerberos:
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > sess_data->func = sess_auth_kerberos;
> > > break;
> > > #else
> > > cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
> > > return -ENOSYS;
> > > -#endif /* CONFIG_CIFS_UPCALL */
> > > +#endif /* CONFIG_SMBFS_UPCALL */
> > > case RawNTLMSSP:
> > > sess_data->func = sess_auth_rawntlmssp_negotiate;
> > > break;
> > > diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
> > > index f36b2d2d40ca..f60b6696a1c1 100644
> > > --- a/fs/cifs/smb1ops.c
> > > +++ b/fs/cifs/smb1ops.c
> > > @@ -926,7 +926,7 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
> > > const unsigned char *searchName, char **symlinkinfo,
> > > const struct nls_table *nls_codepage)
> > > {
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > int rc;
> > > struct dfs_info3_param referral = {0};
> > >
> > > @@ -1226,7 +1226,7 @@ struct smb_version_operations smb1_operations = {
> > > .wp_retry_size = cifs_wp_retry_size,
> > > .dir_needs_close = cifs_dir_needs_close,
> > > .select_sectype = cifs_select_sectype,
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > .query_all_EAs = CIFSSMBQAllEAs,
> > > .set_EA = CIFSSMBSetEA,
> > > #endif /* CIFS_XATTR */
> > > diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
> > > index f5dcc4940b6d..82887064569a 100644
> > > --- a/fs/cifs/smb2file.c
> > > +++ b/fs/cifs/smb2file.c
> > > @@ -11,7 +11,7 @@
> > > #include <linux/slab.h>
> > > #include <linux/pagemap.h>
> > > #include <asm/div64.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
> > > index 8571a459c710..66b2d03ea231 100644
> > > --- a/fs/cifs/smb2inode.c
> > > +++ b/fs/cifs/smb2inode.c
> > > @@ -12,7 +12,7 @@
> > > #include <linux/slab.h>
> > > #include <linux/pagemap.h>
> > > #include <asm/div64.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> > > index 82dd2e973753..012b8b8a96ba 100644
> > > --- a/fs/cifs/smb2ops.c
> > > +++ b/fs/cifs/smb2ops.c
> > > @@ -14,7 +14,7 @@
> > > #include <crypto/aead.h>
> > > #include <linux/fiemap.h>
> > > #include <uapi/linux/magic.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifsglob.h"
> > > #include "smb2pdu.h"
> > > #include "smb2proto.h"
> > > @@ -379,7 +379,7 @@ smb2_find_dequeue_mid(struct TCP_Server_Info *server, char *buf)
> > > static void
> > > smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
> > > {
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
> > >
> > > cifs_server_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n",
> > > @@ -437,7 +437,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> > > /* start with specified wsize, or default */
> > > wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
> > > wsize = min_t(unsigned int, wsize, server->max_write);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (server->rdma) {
> > > if (server->sign)
> > > /*
> > > @@ -485,7 +485,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> > > /* start with specified rsize, or default */
> > > rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
> > > rsize = min_t(unsigned int, rsize, server->max_read);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (server->rdma) {
> > > if (server->sign)
> > > /*
> > > @@ -930,7 +930,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
> > > o_rsp = (struct smb2_create_rsp *)rsp_iov[0].iov_base;
> > > oparms.fid->persistent_fid = o_rsp->PersistentFileId;
> > > oparms.fid->volatile_fid = o_rsp->VolatileFileId;
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > oparms.fid->mid = le64_to_cpu(o_rsp->hdr.MessageId);
> > > #endif /* CIFS_DEBUG2 */
> > >
> > > @@ -1132,7 +1132,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > static ssize_t
> > > move_smb2_ea_to_cifs(char *dst, size_t dst_size,
> > > struct smb2_file_full_ea_info *src, size_t src_size,
> > > @@ -1544,7 +1544,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
> > > cfile->fid.persistent_fid = fid->persistent_fid;
> > > cfile->fid.volatile_fid = fid->volatile_fid;
> > > cfile->fid.access = fid->access;
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > cfile->fid.mid = fid->mid;
> > > #endif /* CIFS_DEBUG2 */
> > > server->ops->set_oplock_level(cinode, oplock, fid->epoch,
> > > @@ -4352,7 +4352,7 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
> > > }
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > static bool
> > > smb2_is_read_op(__u32 oplock)
> > > {
> > > @@ -4941,7 +4941,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid,
> > > }
> > >
> > > data_offset = server->ops->read_data_offset(buf);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > use_rdma_mr = rdata->mr;
> > > #endif
> > > data_len = server->ops->read_data_length(buf, use_rdma_mr);
> > > @@ -5073,7 +5073,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
> > > dw->ppages, dw->npages, dw->len,
> > > true);
> > > if (rc >= 0) {
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > mid->when_received = jiffies;
> > > #endif
> > > if (dw->server->ops->is_network_name_deleted)
> > > @@ -5460,7 +5460,7 @@ smb2_make_node(unsigned int xid, struct inode *inode,
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > struct smb_version_operations smb20_operations = {
> > > .compare_fids = smb2_compare_fids,
> > > .setup_request = smb2_setup_request,
> > > @@ -5544,7 +5544,7 @@ struct smb_version_operations smb20_operations = {
> > > .dir_needs_close = smb2_dir_needs_close,
> > > .get_dfs_refer = smb2_get_dfs_refer,
> > > .select_sectype = smb2_select_sectype,
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > .query_all_EAs = smb2_query_eas,
> > > .set_EA = smb2_set_ea,
> > > #endif /* CIFS_XATTR */
> > > @@ -5647,7 +5647,7 @@ struct smb_version_operations smb21_operations = {
> > > .notify = smb3_notify,
> > > .get_dfs_refer = smb2_get_dfs_refer,
> > > .select_sectype = smb2_select_sectype,
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > .query_all_EAs = smb2_query_eas,
> > > .set_EA = smb2_set_ea,
> > > #endif /* CIFS_XATTR */
> > > @@ -5761,7 +5761,7 @@ struct smb_version_operations smb30_operations = {
> > > .receive_transform = smb3_receive_transform,
> > > .get_dfs_refer = smb2_get_dfs_refer,
> > > .select_sectype = smb2_select_sectype,
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > .query_all_EAs = smb2_query_eas,
> > > .set_EA = smb2_set_ea,
> > > #endif /* CIFS_XATTR */
> > > @@ -5875,7 +5875,7 @@ struct smb_version_operations smb311_operations = {
> > > .receive_transform = smb3_receive_transform,
> > > .get_dfs_refer = smb2_get_dfs_refer,
> > > .select_sectype = smb2_select_sectype,
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > .query_all_EAs = smb2_query_eas,
> > > .set_EA = smb2_set_ea,
> > > #endif /* CIFS_XATTR */
> > > @@ -5891,7 +5891,7 @@ struct smb_version_operations smb311_operations = {
> > > .is_network_name_deleted = smb2_is_network_name_deleted,
> > > };
> > >
> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > > struct smb_version_values smb20_values = {
> > > .version_string = SMB20_VERSION_STRING,
> > > .protocol_id = SMB20_PROT_ID,
> > > diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> > > index 131bec79d6fd..86decb4642aa 100644
> > > --- a/fs/cifs/smb2pdu.c
> > > +++ b/fs/cifs/smb2pdu.c
> > > @@ -36,7 +36,7 @@
> > > #include "cifs_spnego.h"
> > > #include "smbdirect.h"
> > > #include "trace.h"
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > #include "dfs_cache.h"
> > > #endif
> > >
> > > @@ -1319,7 +1319,7 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
> > > else
> > > req->SecurityMode = 0;
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
> > > #else
> > > req->Capabilities = 0;
> > > @@ -1402,7 +1402,7 @@ SMB2_sess_establish_session(struct SMB2_sess_data *sess_data)
> > > return rc;
> > > }
> > >
> > > -#ifdef CONFIG_CIFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_UPCALL
> > > static void
> > > SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
> > > {
> > > @@ -1638,7 +1638,7 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
> > > }
> > >
> > > rc = SMB2_sess_establish_session(sess_data);
> > > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> > > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> > > if (ses->server->dialect < SMB30_PROT_ID) {
> > > cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
> > > /*
> > > @@ -3026,7 +3026,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
> > > oparms->fid->persistent_fid = rsp->PersistentFileId;
> > > oparms->fid->volatile_fid = rsp->VolatileFileId;
> > > oparms->fid->access = oparms->desired_access;
> > > -#ifdef CONFIG_CIFS_DEBUG2
> > > +#ifdef CONFIG_SMBFS_DEBUG2
> > > oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
> > > #endif /* CIFS_DEBUG2 */
> > >
> > > @@ -4057,7 +4057,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
> > > io_parms->persistent_fid,
> > > io_parms->tcon->tid, io_parms->tcon->ses->Suid,
> > > io_parms->offset, io_parms->length);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > /*
> > > * If we want to do a RDMA write, fill in and append
> > > * smbd_buffer_descriptor_v1 to the end of read request
> > > @@ -4177,7 +4177,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
> > > default:
> > > rdata->result = -EIO;
> > > }
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > /*
> > > * If this rdata has a memmory registered, the MR can be freed
> > > * MR needs to be freed as soon as I/O finishes to prevent deadlock
> > > @@ -4411,7 +4411,7 @@ smb2_writev_callback(struct mid_q_entry *mid)
> > > wdata->result = -EIO;
> > > break;
> > > }
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > /*
> > > * If this wdata has a memory registered, the MR can be freed
> > > * The number of MRs available is limited, it's important to recover
> > > @@ -4484,7 +4484,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> > >
> > > trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid,
> > > tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes);
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > /*
> > > * If we want to do a server RDMA read, fill in and append
> > > * smbd_buffer_descriptor_v1 to the end of write request
> > > @@ -4536,7 +4536,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> > > rqst.rq_npages = wdata->nr_pages;
> > > rqst.rq_pagesz = wdata->pagesz;
> > > rqst.rq_tailsz = wdata->tailsz;
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > if (wdata->mr) {
> > > iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
> > > rqst.rq_npages = 0;
> > > @@ -4545,7 +4545,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> > > cifs_dbg(FYI, "async write at %llu %u bytes\n",
> > > wdata->offset, wdata->bytes);
> > >
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > /* For RDMA read, I/O size is in RemainingBytes not in Length */
> > > if (!wdata->mr)
> > > req->Length = cpu_to_le32(wdata->bytes);
> > > diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
> > > index f64922f340b3..00313a488e6f 100644
> > > --- a/fs/cifs/smb2transport.c
> > > +++ b/fs/cifs/smb2transport.c
> > > @@ -454,7 +454,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
> > > if (rc)
> > > return rc;
> > >
> > > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> > > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> > > cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);
> > > /*
> > > * The session id is opaque in terms of endianness, so we can't
> > > diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
> > > index a87fca82a796..922344c8d5c1 100644
> > > --- a/fs/cifs/smbdirect.h
> > > +++ b/fs/cifs/smbdirect.h
> > > @@ -7,7 +7,7 @@
> > > #ifndef _SMBDIRECT_H
> > > #define _SMBDIRECT_H
> > >
> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > > #define cifs_rdma_enabled(server) ((server)->rdma)
> > >
> > > #include "cifsglob.h"
> > > diff --git a/fs/cifs/cifsfs.h b/fs/cifs/smbfs.h
> > > similarity index 97%
> > > rename from fs/cifs/cifsfs.h
> > > rename to fs/cifs/smbfs.h
> > > index 81f4c15936d0..d067be5d3184 100644
> > > --- a/fs/cifs/cifsfs.h
> > > +++ b/fs/cifs/smbfs.h
> > > @@ -115,7 +115,7 @@ extern int cifs_readdir(struct file *file, struct dir_context *ctx);
> > > extern const struct dentry_operations cifs_dentry_ops;
> > > extern const struct dentry_operations cifs_ci_dentry_ops;
> > >
> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > > extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
> > > #else
> > > #define cifs_dfs_d_automount NULL
> > > @@ -127,12 +127,12 @@ extern const char *cifs_get_link(struct dentry *, struct inode *,
> > > extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
> > > struct dentry *direntry, const char *symname);
> > >
> > > -#ifdef CONFIG_CIFS_XATTR
> > > +#ifdef CONFIG_SMBFS_XATTR
> > > extern const struct xattr_handler *cifs_xattr_handlers[];
> > > extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
> > > #else
> > > -# define cifs_xattr_handlers NULL
> > > -# define cifs_listxattr NULL
> > > +#define cifs_xattr_handlers NULL
> > > +#define cifs_listxattr NULL
> > > #endif
> > >
> > > extern ssize_t cifs_file_copychunk_range(unsigned int xid,
> > > @@ -148,9 +148,9 @@ struct smb3_fs_context;
> > > extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
> > > int flags, struct smb3_fs_context *ctx);
> > >
> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > > extern const struct export_operations cifs_export_ops;
> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> > >
> > > /* when changing internal version - update following two lines at same time */
> > > #define SMB3_PRODUCT_BUILD 38
> > > diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
> > > index 160463e22c95..cd689b47d0d9 100644
> > > --- a/fs/cifs/transport.c
> > > +++ b/fs/cifs/transport.c
> > > @@ -77,7 +77,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> > > {
> > > struct mid_q_entry *midEntry =
> > > container_of(refcount, struct mid_q_entry, refcount);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > __le16 command = midEntry->server->vals->lock_cmd;
> > > __u16 smb_cmd = le16_to_cpu(midEntry->command);
> > > unsigned long now;
> > > @@ -96,7 +96,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> > > cifs_buf_release(midEntry->resp_buf);
> > > else
> > > cifs_small_buf_release(midEntry->resp_buf);
> > > -#ifdef CONFIG_CIFS_STATS2
> > > +#ifdef CONFIG_SMBFS_STATS2
> > > now = jiffies;
> > > if (now < midEntry->when_alloc)
> > > cifs_server_dbg(VFS, "Invalid mid allocation time\n");
> > > diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> > > index 9d486fbbfbbd..bce40126e1a9 100644
> > > --- a/fs/cifs/xattr.c
> > > +++ b/fs/cifs/xattr.c
> > > @@ -10,7 +10,7 @@
> > > #include <linux/posix_acl_xattr.h>
> > > #include <linux/slab.h>
> > > #include <linux/xattr.h>
> > > -#include "cifsfs.h"
> > > +#include "smbfs.h"
> > > #include "cifspdu.h"
> > > #include "cifsglob.h"
> > > #include "cifsproto.h"
> > > @@ -202,7 +202,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > > }
> > >
> > > case XATTR_ACL_ACCESS:
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > if (!value)
> > > goto out;
> > > if (sb->s_flags & SB_POSIXACL)
> > > @@ -210,11 +210,11 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > > value, (const int)size,
> > > ACL_TYPE_ACCESS, cifs_sb->local_nls,
> > > cifs_remap(cifs_sb));
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > > break;
> > >
> > > case XATTR_ACL_DEFAULT:
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > if (!value)
> > > goto out;
> > > if (sb->s_flags & SB_POSIXACL)
> > > @@ -222,7 +222,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > > value, (const int)size,
> > > ACL_TYPE_DEFAULT, cifs_sb->local_nls,
> > > cifs_remap(cifs_sb));
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > > break;
> > > }
> > >
> > > @@ -366,23 +366,23 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
> > > }
> > >
> > > case XATTR_ACL_ACCESS:
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > if (sb->s_flags & SB_POSIXACL)
> > > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> > > value, size, ACL_TYPE_ACCESS,
> > > cifs_sb->local_nls,
> > > cifs_remap(cifs_sb));
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > > break;
> > >
> > > case XATTR_ACL_DEFAULT:
> > > -#ifdef CONFIG_CIFS_POSIX
> > > +#ifdef CONFIG_SMBFS_POSIX
> > > if (sb->s_flags & SB_POSIXACL)
> > > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> > > value, size, ACL_TYPE_DEFAULT,
> > > cifs_sb->local_nls,
> > > cifs_remap(cifs_sb));
> > > -#endif /* CONFIG_CIFS_POSIX */
> > > +#endif /* CONFIG_SMBFS_POSIX */
> > > break;
> > > }
> > >
> > > --
> > > 2.35.3
> > >
> >
> >
> > --
> > Thanks,
> >
> > Steve
>
>
>
> --
> Thanks,
>
> Steve



--
Thanks,

Steve

2023-07-26 20:52:22

by Steve French

[permalink] [raw]
Subject: Re: [RFC PATCH 1/3] cifs: change module name to "smbfs.ko"

This was an old patch series I found when looking for something else.

On Wed, Jul 26, 2023 at 3:28 PM Steve French <[email protected]> wrote:
>
> I like the idea but am curious about other's opinions.
>
> On Mon, Aug 1, 2022 at 2:09 PM Enzo Matsumiya <[email protected]> wrote:
> >
> > Rename "cifs.ko" module to "smbfs.ko", but keep "cifs" as a module alias
> > for compatibility with existing scripts/tools.
> >
> > TODO: update spnego and idmap key names, cifs-utils, etc, warn about
> > module rename
> > To discuss: procfs entries (/proc/fs/cifs)
> >
> > Signed-off-by: Enzo Matsumiya <[email protected]>
> > ---
> > fs/Kconfig | 4 +-
> > fs/Makefile | 2 +-
> > fs/cifs/Kconfig | 108 +++++++++++++++++-----------------
> > fs/cifs/Makefile | 24 ++++----
> > fs/cifs/cifs_debug.c | 72 +++++++++++------------
> > fs/cifs/cifs_debug.h | 4 +-
> > fs/cifs/cifs_dfs_ref.c | 2 +-
> > fs/cifs/cifs_spnego.c | 4 +-
> > fs/cifs/cifs_swn.h | 4 +-
> > fs/cifs/cifsacl.c | 6 +-
> > fs/cifs/cifsglob.h | 26 ++++----
> > fs/cifs/cifspdu.h | 6 +-
> > fs/cifs/cifsproto.h | 10 ++--
> > fs/cifs/cifssmb.c | 14 ++---
> > fs/cifs/connect.c | 36 ++++++------
> > fs/cifs/{cifsfs.c => core.c} | 49 +++++++--------
> > fs/cifs/dfs_cache.c | 2 +-
> > fs/cifs/dir.c | 2 +-
> > fs/cifs/export.c | 8 +--
> > fs/cifs/file.c | 16 ++---
> > fs/cifs/fs_context.c | 20 +++----
> > fs/cifs/fscache.h | 6 +-
> > fs/cifs/inode.c | 10 ++--
> > fs/cifs/ioctl.c | 6 +-
> > fs/cifs/link.c | 2 +-
> > fs/cifs/misc.c | 14 ++---
> > fs/cifs/netmisc.c | 2 +-
> > fs/cifs/ntlmssp.h | 2 +-
> > fs/cifs/readdir.c | 4 +-
> > fs/cifs/sess.c | 10 ++--
> > fs/cifs/smb1ops.c | 4 +-
> > fs/cifs/smb2file.c | 2 +-
> > fs/cifs/smb2inode.c | 2 +-
> > fs/cifs/smb2ops.c | 32 +++++-----
> > fs/cifs/smb2pdu.c | 22 +++----
> > fs/cifs/smb2transport.c | 2 +-
> > fs/cifs/smbdirect.h | 2 +-
> > fs/cifs/{cifsfs.h => smbfs.h} | 12 ++--
> > fs/cifs/transport.c | 4 +-
> > fs/cifs/xattr.c | 18 +++---
> > 40 files changed, 287 insertions(+), 288 deletions(-)
> > rename fs/cifs/{cifsfs.c => core.c} (98%)
> > rename fs/cifs/{cifsfs.h => smbfs.h} (97%)
> >
> > diff --git a/fs/Kconfig b/fs/Kconfig
> > index 5976eb33535f..860ca257c681 100644
> > --- a/fs/Kconfig
> > +++ b/fs/Kconfig
> > @@ -377,8 +377,8 @@ source "fs/ksmbd/Kconfig"
> >
> > config SMBFS_COMMON
> > tristate
> > - default y if CIFS=y || SMB_SERVER=y
> > - default m if CIFS=m || SMB_SERVER=m
> > + default y if SMBFS=y || SMB_SERVER=y
> > + default m if SMBFS=m || SMB_SERVER=m
> >
> > source "fs/coda/Kconfig"
> > source "fs/afs/Kconfig"
> > diff --git a/fs/Makefile b/fs/Makefile
> > index 208a74e0b00e..a07039e124ce 100644
> > --- a/fs/Makefile
> > +++ b/fs/Makefile
> > @@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
> > obj-y += unicode/
> > obj-$(CONFIG_SYSV_FS) += sysv/
> > obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
> > -obj-$(CONFIG_CIFS) += cifs/
> > +obj-$(CONFIG_SMBFS) += cifs/
> > obj-$(CONFIG_SMB_SERVER) += ksmbd/
> > obj-$(CONFIG_HPFS_FS) += hpfs/
> > obj-$(CONFIG_NTFS_FS) += ntfs/
> > diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
> > index 3b7e3b9e4fd2..c2157720ffc1 100644
> > --- a/fs/cifs/Kconfig
> > +++ b/fs/cifs/Kconfig
> > @@ -1,6 +1,6 @@
> > # SPDX-License-Identifier: GPL-2.0-only
> > -config CIFS
> > - tristate "SMB3 and CIFS support (advanced network filesystem)"
> > +config SMBFS
> > + tristate "SMBFS support (protocol versions 1, 2, and 3)"
> > depends on INET
> > select NLS
> > select CRYPTO
> > @@ -37,9 +37,9 @@ config CIFS
> > and similar very old servers.
> >
> > This module provides an advanced network file system client
> > - for mounting to SMB3 (and CIFS) compliant servers. It includes
> > - support for DFS (hierarchical name space), secure per-user
> > - session establishment via Kerberos or NTLM or NTLMv2, RDMA
> > + for mounting to SMB-compliant servers. It includes support for
> > + DFS (hierarchical name space), secure per-user session
> > + establishment via Kerberos or NTLM or NTLMv2, RDMA
> > (smbdirect), advanced security features, per-share encryption,
> > directory leases, safe distributed caching (oplock), optional packet
> > signing, Unicode and other internationalization improvements.
> > @@ -47,29 +47,29 @@ config CIFS
> > In general, the default dialects, SMB3 and later, enable better
> > performance, security and features, than would be possible with CIFS.
> > Note that when mounting to Samba, due to the CIFS POSIX extensions,
> > - CIFS mounts can provide slightly better POSIX compatibility
> > + SMBFS mounts can provide slightly better POSIX compatibility
> > than SMB3 mounts. SMB2/SMB3 mount options are also
> > slightly simpler (compared to CIFS) due to protocol improvements.
> >
> > If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y.
> >
> > -config CIFS_STATS2
> > +config SMBFS_STATS2
> > bool "Extended statistics"
> > - depends on CIFS
> > + depends on SMBFS
> > default y
> > help
> > Enabling this option will allow more detailed statistics on SMB
> > request timing to be displayed in /proc/fs/cifs/DebugData and also
> > allow optional logging of slow responses to dmesg (depending on the
> > - value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/cifs/usage.rst
> > + value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/smbfs/usage.rst
> > for more details. These additional statistics may have a minor effect
> > on performance and memory utilization.
> >
> > If unsure, say Y.
> >
> > -config CIFS_ALLOW_INSECURE_LEGACY
> > +config SMBFS_ALLOW_INSECURE_LEGACY
> > bool "Support legacy servers which use less secure dialects"
> > - depends on CIFS
> > + depends on SMBFS
> > default y
> > help
> > Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
> > @@ -78,69 +78,69 @@ config CIFS_ALLOW_INSECURE_LEGACY
> > of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.
> >
> > Disabling this option prevents users from using vers=1.0 or vers=2.0
> > - on mounts with cifs.ko
> > + on mounts with smbfs.ko
> >
> > If unsure, say Y.
> >
> > -config CIFS_UPCALL
> > +config SMBFS_UPCALL
> > bool "Kerberos/SPNEGO advanced session setup"
> > - depends on CIFS
> > + depends on SMBFS
> > help
> > - Enables an upcall mechanism for CIFS which accesses userspace helper
> > + Enables an upcall mechanism for SMBFS which accesses userspace helper
> > utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
> > which are needed to mount to certain secure servers (for which more
> > secure Kerberos authentication is required). If unsure, say Y.
> >
> > -config CIFS_XATTR
> > +config SMBFS_XATTR
> > bool "CIFS extended attributes"
> > - depends on CIFS
> > + depends on SMBFS
> > help
> > Extended attributes are name:value pairs associated with inodes by
> > the kernel or by users (see the attr(5) manual page for details).
> > - CIFS maps the name of extended attributes beginning with the user
> > + SMBFS maps the name of extended attributes beginning with the user
> > namespace prefix to SMB/CIFS EAs. EAs are stored on Windows
> > servers without the user namespace prefix, but their names are
> > - seen by Linux cifs clients prefaced by the user namespace prefix.
> > + seen by Linux SMBFS clients prefaced by the user namespace prefix.
> > The system namespace (used by some filesystems to store ACLs) is
> > not supported at this time.
> >
> > If unsure, say Y.
> >
> > -config CIFS_POSIX
> > - bool "CIFS POSIX Extensions"
> > - depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
> > +config SMBFS_POSIX
> > + bool "SMBFS POSIX Extensions"
> > + depends on SMBFS && SMBFS_ALLOW_INSECURE_LEGACY && SMBFS_XATTR
> > help
> > - Enabling this option will cause the cifs client to attempt to
> > + Enabling this option will cause SMBFS to attempt to
> > negotiate a newer dialect with servers, such as Samba 3.0.5
> > or later, that optionally can handle more POSIX like (rather
> > than Windows like) file behavior. It also enables
> > support for POSIX ACLs (getfacl and setfacl) to servers
> > (such as Samba 3.10 and later) which can negotiate
> > - CIFS POSIX ACL support. If unsure, say N.
> > + SMBFS POSIX ACL support. If unsure, say N.
> >
> > -config CIFS_DEBUG
> > - bool "Enable CIFS debugging routines"
> > +config SMBFS_DEBUG
> > + bool "Enable SMBFS debugging routines"
> > default y
> > - depends on CIFS
> > + depends on SMBFS
> > help
> > Enabling this option adds helpful debugging messages to
> > - the cifs code which increases the size of the cifs module.
> > + the SMBFS code which increases the size of the module.
> > If unsure, say Y.
> >
> > -config CIFS_DEBUG2
> > - bool "Enable additional CIFS debugging routines"
> > - depends on CIFS_DEBUG
> > +config SMBFS_DEBUG2
> > + bool "Enable additional SMBFS debugging routines"
> > + depends on SMBFS_DEBUG
> > help
> > Enabling this option adds a few more debugging routines
> > - to the cifs code which slightly increases the size of
> > - the cifs module and can cause additional logging of debug
> > + to the SMBFS code which slightly increases the size of
> > + the module and can cause additional logging of debug
> > messages in some error paths, slowing performance. This
> > option can be turned off unless you are debugging
> > - cifs problems. If unsure, say N.
> > + SMBFS problems. If unsure, say N.
> >
> > -config CIFS_DEBUG_DUMP_KEYS
> > +config SMBFS_DEBUG_DUMP_KEYS
> > bool "Dump encryption keys for offline decryption (Unsafe)"
> > - depends on CIFS_DEBUG
> > + depends on SMBFS_DEBUG
> > help
> > Enabling this will dump the encryption and decryption keys
> > used to communicate on an encrypted share connection on the
> > @@ -148,55 +148,55 @@ config CIFS_DEBUG_DUMP_KEYS
> > encrypted network captures. Enable this carefully.
> > If unsure, say N.
> >
> > -config CIFS_DFS_UPCALL
> > +config SMBFS_DFS_UPCALL
> > bool "DFS feature support"
> > - depends on CIFS
> > + depends on SMBFS
> > help
> > Distributed File System (DFS) support is used to access shares
> > transparently in an enterprise name space, even if the share
> > moves to a different server. This feature also enables
> > - an upcall mechanism for CIFS which contacts userspace helper
> > + an upcall mechanism for SMBFS which contacts userspace helper
> > utilities to provide server name resolution (host names to
> > IP addresses) which is needed in order to reconnect to
> > servers if their addresses change or for implicit mounts of
> > DFS junction points. If unsure, say Y.
> >
> > -config CIFS_SWN_UPCALL
> > +config SMBFS_SWN_UPCALL
> > bool "SWN feature support"
> > - depends on CIFS
> > + depends on SMBFS
> > help
> > The Service Witness Protocol (SWN) is used to get notifications
> > from a highly available server of resource state changes. This
> > - feature enables an upcall mechanism for CIFS which contacts a
> > + feature enables an upcall mechanism for SMBFS which contacts a
> > userspace daemon to establish the DCE/RPC connection to retrieve
> > the cluster available interfaces and resource change notifications.
> > If unsure, say Y.
> >
> > -config CIFS_NFSD_EXPORT
> > - bool "Allow nfsd to export CIFS file system"
> > - depends on CIFS && BROKEN
> > +config SMBFS_NFSD_EXPORT
> > + bool "Allow nfsd to export SMBFS file system"
> > + depends on SMBFS && BROKEN
> > help
> > - Allows NFS server to export a CIFS mounted share (nfsd over cifs)
> > + Allows NFS server to export a SMBFS mounted share (nfsd over SMBFS)
> >
> > -config CIFS_SMB_DIRECT
> > +config SMBFS_SMB_DIRECT
> > bool "SMB Direct support"
> > - depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> > + depends on SMBFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMBFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> > help
> > Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
> > SMB Direct allows transferring SMB packets over RDMA. If unsure,
> > say Y.
> >
> > -config CIFS_FSCACHE
> > - bool "Provide CIFS client caching support"
> > - depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
> > +config SMBFS_FSCACHE
> > + bool "Provide SMBFS client caching support"
> > + depends on SMBFS=m && FSCACHE || SMBFS=y && FSCACHE=y
> > help
> > - Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
> > + Makes SMBFS FS-Cache capable. Say Y here if you want your SMBFS data
> > to be cached locally on disk through the general filesystem cache
> > manager. If unsure, say N.
> >
> > -config CIFS_ROOT
> > +config SMBFS_ROOT
> > bool "SMB root file system (Experimental)"
> > - depends on CIFS=y && IP_PNP
> > + depends on SMBFS=y && IP_PNP
> > help
> > Enables root file system support over SMB protocol.
> >
> > diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
> > index 8c9f2c00be72..07096b742b1d 100644
> > --- a/fs/cifs/Makefile
> > +++ b/fs/cifs/Makefile
> > @@ -1,11 +1,11 @@
> > # SPDX-License-Identifier: GPL-2.0
> > #
> > -# Makefile for Linux CIFS/SMB2/SMB3 VFS client
> > +# Makefile for Linux SMBFS VFS client
> > #
> > -ccflags-y += -I$(src) # needed for trace events
> > -obj-$(CONFIG_CIFS) += cifs.o
> > +ccflags-y += -I$(src) # needed for trace events
> > +obj-$(CONFIG_SMBFS) += smbfs.o
> >
> > -cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> > +smbfs-y := trace.o core.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> > inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
> > cifs_unicode.o nterr.o cifsencrypt.o \
> > readdir.o ioctl.o sess.o export.o unc.o winucase.o \
> > @@ -17,18 +17,18 @@ $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h
> >
> > $(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h
> >
> > -cifs-$(CONFIG_CIFS_XATTR) += xattr.o
> > +smbfs-$(CONFIG_SMBFS_XATTR) += xattr.o
> >
> > -cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
> > +smbfs-$(CONFIG_SMBFS_UPCALL) += cifs_spnego.o
> >
> > -cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
> > +smbfs-$(CONFIG_SMBFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
> >
> > -cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
> > +smbfs-$(CONFIG_SMBFS_SWN_UPCALL) += netlink.o cifs_swn.o
> >
> > -cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
> > +smbfs-$(CONFIG_SMBFS_FSCACHE) += fscache.o
> >
> > -cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
> > +smbfs-$(CONFIG_SMBFS_SMB_DIRECT) += smbdirect.o
> >
> > -cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
> > +smbfs-$(CONFIG_SMBFS_ROOT) += cifsroot.o
> >
> > -cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> > +smbfs-$(CONFIG_SMBFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> > diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
> > index 11fd85de7217..ae588a8caa90 100644
> > --- a/fs/cifs/cifs_debug.c
> > +++ b/fs/cifs/cifs_debug.c
> > @@ -15,12 +15,12 @@
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > #include "cifs_debug.h"
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "fs_context.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > #include "smbdirect.h"
> > #endif
> > #include "cifs_swn.h"
> > @@ -35,7 +35,7 @@ cifs_dump_mem(char *label, void *data, int length)
> >
> > void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> > {
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > struct smb_hdr *smb = buf;
> >
> > cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
> > @@ -43,12 +43,12 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> > smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
> > cifs_dbg(VFS, "smb buf %p len %u\n", smb,
> > server->ops->calc_smb_size(smb, server));
> > -#endif /* CONFIG_CIFS_DEBUG2 */
> > +#endif /* CONFIG_SMBFS_DEBUG2 */
> > }
> >
> > void cifs_dump_mids(struct TCP_Server_Info *server)
> > {
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > struct mid_q_entry *mid_entry;
> >
> > if (server == NULL)
> > @@ -63,7 +63,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> > mid_entry->pid,
> > mid_entry->callback_data,
> > mid_entry->mid);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
> > mid_entry->large_buf,
> > mid_entry->resp_buf,
> > @@ -79,7 +79,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> > }
> > }
> > spin_unlock(&server->mid_lock);
> > -#endif /* CONFIG_CIFS_DEBUG2 */
> > +#endif /* CONFIG_SMBFS_DEBUG2 */
> > }
> >
> > #ifdef CONFIG_PROC_FS
> > @@ -176,7 +176,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> > seq_puts(m, "# Version:1\n");
> > seq_puts(m, "# Format:\n");
> > seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>");
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > seq_printf(m, " <filename> <mid>\n");
> > #else
> > seq_printf(m, " <filename>\n");
> > @@ -196,7 +196,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> > cfile->pid,
> > from_kuid(&init_user_ns, cfile->uid),
> > cfile->dentry);
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > seq_printf(m, " %llu\n", cfile->fid.mid);
> > #else
> > seq_printf(m, "\n");
> > @@ -225,39 +225,39 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> > "---------------------------------------------------\n");
> > seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
> > seq_printf(m, "Features:");
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > seq_printf(m, " DFS");
> > #endif
> > -#ifdef CONFIG_CIFS_FSCACHE
> > +#ifdef CONFIG_SMBFS_FSCACHE
> > seq_printf(m, ",FSCACHE");
> > #endif
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > seq_printf(m, ",SMB_DIRECT");
> > #endif
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > seq_printf(m, ",STATS2");
> > #else
> > seq_printf(m, ",STATS");
> > #endif
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > seq_printf(m, ",DEBUG2");
> > -#elif defined(CONFIG_CIFS_DEBUG)
> > +#elif defined(CONFIG_SMBFS_DEBUG)
> > seq_printf(m, ",DEBUG");
> > #endif
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > seq_printf(m, ",ALLOW_INSECURE_LEGACY");
> > #endif
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > seq_printf(m, ",CIFS_POSIX");
> > #endif
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > seq_printf(m, ",UPCALL(SPNEGO)");
> > #endif
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > seq_printf(m, ",XATTR");
> > #endif
> > seq_printf(m, ",ACL");
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > seq_puts(m, ",WITNESS");
> > #endif
> > seq_putc(m, '\n');
> > @@ -279,7 +279,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> >
> > if (server->hostname)
> > seq_printf(m, "Hostname: %s ", server->hostname);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (!server->rdma)
> > goto skip_rdma;
> >
> > @@ -498,12 +498,12 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> >
> > rc = kstrtobool_from_user(buffer, count, &bv);
> > if (rc == 0) {
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > int i;
> >
> > atomic_set(&total_buf_alloc_count, 0);
> > atomic_set(&total_small_buf_alloc_count, 0);
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> > atomic_set(&tcpSesReconnectCount, 0);
> > atomic_set(&tconInfoReconnectCount, 0);
> >
> > @@ -514,7 +514,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > spin_lock(&cifs_tcp_ses_lock);
> > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > server->max_in_flight = 0;
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
> > atomic_set(&server->num_cmds[i], 0);
> > atomic_set(&server->smb2slowcmd[i], 0);
> > @@ -522,7 +522,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > server->slowest_cmd[i] = 0;
> > server->fastest_cmd[0] = 0;
> > }
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> > list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
> > list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
> > atomic_set(&tcon->num_smbs_sent, 0);
> > @@ -546,7 +546,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> > static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > {
> > int i;
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > int j;
> > #endif /* STATS2 */
> > struct TCP_Server_Info *server;
> > @@ -562,11 +562,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > cifs_min_rcv + tcpSesAllocCount.counter);
> > seq_printf(m, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
> > small_buf_alloc_count.counter, cifs_min_small);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > seq_printf(m, "Total Large %d Small %d Allocations\n",
> > atomic_read(&total_buf_alloc_count),
> > atomic_read(&total_small_buf_alloc_count));
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> >
> > seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&mid_count));
> > seq_printf(m,
> > @@ -581,7 +581,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> > spin_lock(&cifs_tcp_ses_lock);
> > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > seq_printf(m, "\nMax requests in flight: %d", server->max_in_flight);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > seq_puts(m, "\nTotal time spent processing by command. Time ");
> > seq_printf(m, "units are jiffies (%d per second)\n", HZ);
> > seq_puts(m, " SMB3 CMD\tNumber\tTotal Time\tFastest\tSlowest\n");
> > @@ -630,7 +630,7 @@ static const struct proc_ops cifs_stats_proc_ops = {
> > .proc_write = cifs_stats_proc_write,
> > };
> >
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > #define PROC_FILE_DEFINE(name) \
> > static ssize_t name##_write(struct file *file, const char __user *buffer, \
> > size_t count, loff_t *ppos) \
> > @@ -702,11 +702,11 @@ cifs_proc_init(void)
> >
> > proc_create("mount_params", 0444, proc_fs_cifs, &cifs_mount_params_proc_ops);
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops);
> > #endif
> >
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > proc_create("rdma_readwrite_threshold", 0644, proc_fs_cifs,
> > &cifs_rdma_readwrite_threshold_proc_fops);
> > proc_create("smbd_max_frmr_depth", 0644, proc_fs_cifs,
> > @@ -742,10 +742,10 @@ cifs_proc_clean(void)
> > remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
> > remove_proc_entry("mount_params", proc_fs_cifs);
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > remove_proc_entry("dfscache", proc_fs_cifs);
> > #endif
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > remove_proc_entry("rdma_readwrite_threshold", proc_fs_cifs);
> > remove_proc_entry("smbd_max_frmr_depth", proc_fs_cifs);
> > remove_proc_entry("smbd_keep_alive_interval", proc_fs_cifs);
> > @@ -972,7 +972,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
> >
> > cifs_security_flags_handle_must_flags(&flags);
> >
> > - /* flags look ok - update the global security flags for cifs module */
> > + /* flags look ok - update global security flags */
> > global_secflags = flags;
> > if (global_secflags & CIFSSEC_MUST_SIGN) {
> > /* requiring signing implies signing is allowed */
> > diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
> > index ee4ea2b60c0f..fd6d563b0e81 100644
> > --- a/fs/cifs/cifs_debug.h
> > +++ b/fs/cifs/cifs_debug.h
> > @@ -26,7 +26,7 @@ void dump_smb(void *, int);
> > #define VFS 1
> > #define FYI 2
> > extern int cifsFYI;
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > #define NOISY 4
> > #else
> > #define NOISY 0
> > @@ -37,7 +37,7 @@ extern int cifsFYI;
> > * debug ON
> > * --------
> > */
> > -#ifdef CONFIG_CIFS_DEBUG
> > +#ifdef CONFIG_SMBFS_DEBUG
> >
> >
> > /*
> > diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
> > index b0864da9ef43..c58e67bf62f0 100644
> > --- a/fs/cifs/cifs_dfs_ref.c
> > +++ b/fs/cifs/cifs_dfs_ref.c
> > @@ -18,7 +18,7 @@
> > #include <linux/inet.h>
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "dns_resolve.h"
> > #include "cifs_debug.h"
> > #include "cifs_unicode.h"
> > diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
> > index 342717bf1dc2..fd49a1490daf 100644
> > --- a/fs/cifs/cifs_spnego.c
> > +++ b/fs/cifs/cifs_spnego.c
> > @@ -161,13 +161,13 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
> > spnego_key = request_key(&cifs_spnego_key_type, description, "");
> > revert_creds(saved_cred);
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > if (cifsFYI && !IS_ERR(spnego_key)) {
> > struct cifs_spnego_msg *msg = spnego_key->payload.data[0];
> > cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024U,
> > msg->secblob_len + msg->sesskey_len));
> > }
> > -#endif /* CONFIG_CIFS_DEBUG2 */
> > +#endif /* CONFIG_SMBFS_DEBUG2 */
> >
> > out:
> > kfree(description);
> > diff --git a/fs/cifs/cifs_swn.h b/fs/cifs/cifs_swn.h
> > index 8a9d2a5c9077..1b9da6281131 100644
> > --- a/fs/cifs/cifs_swn.h
> > +++ b/fs/cifs/cifs_swn.h
> > @@ -13,7 +13,7 @@ struct cifs_tcon;
> > struct sk_buff;
> > struct genl_info;
> >
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > extern int cifs_swn_register(struct cifs_tcon *tcon);
> >
> > extern int cifs_swn_unregister(struct cifs_tcon *tcon);
> > @@ -48,5 +48,5 @@ static inline void cifs_swn_check(void) {}
> > static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
> > static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
> >
> > -#endif /* CONFIG_CIFS_SWN_UPCALL */
> > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
> > #endif /* _CIFS_SWN_H */
> > diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> > index bf861fef2f0c..67e06386cfff 100644
> > --- a/fs/cifs/cifsacl.c
> > +++ b/fs/cifs/cifsacl.c
> > @@ -717,7 +717,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
> > }
> >
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
> > {
> > int num_subauth;
> > @@ -803,7 +803,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
> >
> > for (i = 0; i < num_aces; ++i) {
> > ppace[i] = (struct cifs_ace *) (acl_base + acl_size);
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > dump_ace(ppace[i], end_of_acl);
> > #endif
> > if (mode_from_special_sid &&
> > @@ -1162,7 +1162,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
> > return -EINVAL;
> > }
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > if (psid->num_subauth) {
> > int i;
> > cifs_dbg(FYI, "SID revision %d num_auth %d\n",
> > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> > index 3070407cafa7..58db1157d53c 100644
> > --- a/fs/cifs/cifsglob.h
> > +++ b/fs/cifs/cifsglob.h
> > @@ -691,7 +691,7 @@ struct TCP_Server_Info {
> > unsigned int total_read; /* total amount of data read in this pass */
> > atomic_t in_send; /* requests trying to send */
> > atomic_t num_waiters; /* blocked waiting to get in sendrecv */
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
> > atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
> > __u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
> > @@ -728,11 +728,11 @@ struct TCP_Server_Info {
> > #define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server)
> > struct TCP_Server_Info *primary_server;
> >
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > bool use_swn_dstaddr;
> > struct sockaddr_storage swn_dstaddr;
> > #endif
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > bool is_dfs_conn; /* if a dfs connection */
> > struct mutex refpath_lock; /* protects leaf_fullpath */
> > /*
> > @@ -1252,14 +1252,14 @@ struct cifs_tcon {
> > __u32 max_chunks;
> > __u32 max_bytes_chunk;
> > __u32 max_bytes_copy;
> > -#ifdef CONFIG_CIFS_FSCACHE
> > +#ifdef CONFIG_SMBFS_FSCACHE
> > u64 resource_id; /* server resource id */
> > struct fscache_volume *fscache; /* cookie for share */
> > #endif
> > struct list_head pending_opens; /* list of incomplete opens */
> > struct cached_fid crfid; /* Cached root fid */
> > /* BB add field for back pointer to sb struct(s)? */
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > struct list_head ulist; /* cache update list */
> > #endif
> > struct delayed_work query_interfaces; /* query interfaces workqueue job */
> > @@ -1384,7 +1384,7 @@ struct cifs_fid {
> > __u32 access;
> > struct cifs_pending_open *pending_open;
> > unsigned int epoch;
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > __u64 mid;
> > #endif /* CIFS_DEBUG2 */
> > bool purge_cache;
> > @@ -1481,7 +1481,7 @@ struct cifs_readdata {
> > struct iov_iter *iter);
> > struct kvec iov[2];
> > struct TCP_Server_Info *server;
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > struct smbd_mr *mr;
> > #endif
> > unsigned int pagesz;
> > @@ -1506,7 +1506,7 @@ struct cifs_writedata {
> > unsigned int bytes;
> > int result;
> > struct TCP_Server_Info *server;
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > struct smbd_mr *mr;
> > #endif
> > unsigned int pagesz;
> > @@ -1689,7 +1689,7 @@ struct mid_q_entry {
> > __u32 pid; /* process id */
> > __u32 sequence_number; /* for CIFS signing */
> > unsigned long when_alloc; /* when mid was created */
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > unsigned long when_sent; /* time when smb send finished */
> > unsigned long when_received; /* when demux complete (taken off wire) */
> > #endif
> > @@ -1740,7 +1740,7 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
> > atomic_dec(&server->num_waiters);
> > }
> >
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > static inline void cifs_save_when_sent(struct mid_q_entry *mid)
> > {
> > mid->when_sent = jiffies;
> > @@ -1878,7 +1878,7 @@ result of setting MUST flags more than once will be to
> > require use of the stronger protocol */
> > #define CIFSSEC_MUST_NTLMV2 0x04004
> > #define CIFSSEC_MUST_KRB5 0x08008
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > #define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
> > #else
> > #define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
> > @@ -2023,7 +2023,7 @@ extern atomic_t tconInfoReconnectCount;
> > /* Various Debug counters */
> > extern atomic_t buf_alloc_count; /* current number allocated */
> > extern atomic_t small_buf_alloc_count;
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > extern atomic_t total_buf_alloc_count; /* total allocated over all time */
> > extern atomic_t total_small_buf_alloc_count;
> > extern unsigned int slow_rsp_threshold; /* number of secs before logging */
> > @@ -2063,7 +2063,7 @@ extern mempool_t *cifs_mid_poolp;
> > /* Operations for different SMB versions */
> > #define SMB1_VERSION_STRING "1.0"
> > #define SMB20_VERSION_STRING "2.0"
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > extern struct smb_version_operations smb1_operations;
> > extern struct smb_version_values smb1_values;
> > extern struct smb_version_operations smb20_operations;
> > diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
> > index aeba371c4c70..0c24fcbb6622 100644
> > --- a/fs/cifs/cifspdu.h
> > +++ b/fs/cifs/cifspdu.h
> > @@ -2152,7 +2152,7 @@ typedef struct {
> > #define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
> > #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
> > QFS PROXY call */
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
> > LockingX instead of posix locking call on unix sess (and we do not expect
> > LockingX to use different (ie Windows) semantics than posix locking on
> > @@ -2162,7 +2162,7 @@ typedef struct {
> > #define CIFS_UNIX_CAP_MASK 0x000003db
> > #else
> > #define CIFS_UNIX_CAP_MASK 0x00000013
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> >
> >
> > #define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
> > @@ -2607,7 +2607,7 @@ struct data_blob {
> > } __attribute__((packed));
> >
> >
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > /*
> > For better POSIX semantics from Linux client, (even better
> > than the existing CIFS Unix Extensions) we need updated PDUs for:
> > diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
> > index d59aebefa71c..fd225e5d2456 100644
> > --- a/fs/cifs/cifsproto.h
> > +++ b/fs/cifs/cifsproto.h
> > @@ -9,7 +9,7 @@
> > #define _CIFSPROTO_H
> > #include <linux/nls.h>
> > #include "trace.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> >
> > @@ -284,11 +284,11 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
> > int from_reconnect);
> > extern void cifs_put_tcon(struct cifs_tcon *tcon);
> >
> > -#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
> > +#if IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL)
> > extern void cifs_dfs_release_automount_timer(void);
> > -#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> > +#else /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
> > #define cifs_dfs_release_automount_timer() do { } while (0)
> > -#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> > +#endif /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
> >
> > void cifs_proc_init(void);
> > void cifs_proc_clean(void);
> > @@ -656,7 +656,7 @@ int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix);
> > char *extract_hostname(const char *unc);
> > char *extract_sharename(const char *unc);
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
> > const char *old_path,
> > const struct nls_table *nls_codepage,
> > diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> > index 04a4c304d004..3177fc3a2321 100644
> > --- a/fs/cifs/cifssmb.c
> > +++ b/fs/cifs/cifssmb.c
> > @@ -32,11 +32,11 @@
> > #include "smb2proto.h"
> > #include "fscache.h"
> > #include "smbdirect.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> >
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > static struct {
> > int index;
> > char *name;
> > @@ -56,7 +56,7 @@ static struct {
> > #endif
> >
> > /* define the number of elements in the cifs dialect array */
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > #define CIFS_NUM_PROT 2
> > #else /* not posix */
> > #define CIFS_NUM_PROT 1
> > @@ -1528,7 +1528,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
> > }
> >
> > /* how much data is in the response? */
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > use_rdma_mr = rdata->mr;
> > #endif
> > data_len = server->ops->read_data_length(buf, use_rdma_mr);
> > @@ -1914,7 +1914,7 @@ cifs_writedata_release(struct kref *refcount)
> > {
> > struct cifs_writedata *wdata = container_of(refcount,
> > struct cifs_writedata, refcount);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (wdata->mr) {
> > smbd_deregister_mr(wdata->mr);
> > wdata->mr = NULL;
> > @@ -3360,7 +3360,7 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
> > }
> >
> >
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> >
> > /*Convert an Access Control Entry from wire format to local POSIX xattr format*/
> > static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
> > @@ -6054,7 +6054,7 @@ CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > /*
> > * Do a path-based QUERY_ALL_EAS call and parse the result. This is a common
> > * function used by listxattr and getxattr type calls. When ea_name is set,
> > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> > index 1362210f3ece..90d0254e2735 100644
> > --- a/fs/cifs/connect.c
> > +++ b/fs/cifs/connect.c
> > @@ -45,7 +45,7 @@
> > #include "smb2proto.h"
> > #include "smbdirect.h"
> > #include "dns_resolve.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> > #include "fs_context.h"
> > @@ -68,7 +68,7 @@ struct mount_ctx {
> > struct TCP_Server_Info *server;
> > struct cifs_ses *ses;
> > struct cifs_tcon *tcon;
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > struct cifs_ses *root_ses;
> > uuid_t mount_id;
> > char *origin_fullpath, *leaf_fullpath;
> > @@ -429,7 +429,7 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > static int __reconnect_target_unlocked(struct TCP_Server_Info *server, const char *target)
> > {
> > int rc;
> > @@ -841,7 +841,7 @@ is_smb_response(struct TCP_Server_Info *server, unsigned char type)
> > void
> > dequeue_mid(struct mid_q_entry *mid, bool malformed)
> > {
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > mid->when_received = jiffies;
> > #endif
> > spin_lock(&mid->server->mid_lock);
> > @@ -983,7 +983,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
> > */
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > kfree(server->origin_fullpath);
> > kfree(server->leaf_fullpath);
> > #endif
> > @@ -1238,7 +1238,7 @@ cifs_demultiplex_thread(void *p)
> > cifs_dump_mem("Received Data is: ", bufs[i],
> > HEADER_SIZE(server));
> > smb2_add_credits_from_hdr(bufs[i], server);
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > if (server->ops->dump_detail)
> > server->ops->dump_detail(bufs[i],
> > server);
> > @@ -1467,7 +1467,7 @@ cifs_find_tcp_session(struct smb3_fs_context *ctx)
> > spin_lock(&cifs_tcp_ses_lock);
> > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> > spin_lock(&server->srv_lock);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > /*
> > * DFS failover implementation in cifs_reconnect() requires unique tcp sessions for
> > * DFS connections to do failover properly, so avoid sharing them with regular
> > @@ -1621,7 +1621,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> > INIT_DELAYED_WORK(&tcp_ses->resolve, cifs_resolve_server);
> > INIT_DELAYED_WORK(&tcp_ses->reconnect, smb2_reconnect_server);
> > mutex_init(&tcp_ses->reconnect_mutex);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > mutex_init(&tcp_ses->refpath_lock);
> > #endif
> > memcpy(&tcp_ses->srcaddr, &ctx->srcaddr,
> > @@ -1647,8 +1647,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> > else
> > tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
> > if (tcp_ses->rdma) {
> > -#ifndef CONFIG_CIFS_SMB_DIRECT
> > - cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
> > +#ifndef CONFIG_SMBFS_SMB_DIRECT
> > + cifs_dbg(VFS, "CONFIG_SMBFS_SMB_DIRECT is not enabled\n");
> > rc = -ENOENT;
> > goto out_err_crypto_release;
> > #endif
> > @@ -2496,7 +2496,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
> > }
> >
> > tcon->use_witness = false;
> > - if (IS_ENABLED(CONFIG_CIFS_SWN_UPCALL) && ctx->witness) {
> > + if (IS_ENABLED(CONFIG_SMBFS_SWN_UPCALL) && ctx->witness) {
> > if (ses->server->vals->protocol_id >= SMB30_PROT_ID) {
> > if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) {
> > /*
> > @@ -3052,7 +3052,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
> > }
> >
> > cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap);
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > if (cap & CIFS_UNIX_FCNTL_CAP)
> > cifs_dbg(FYI, "FCNTL cap\n");
> > if (cap & CIFS_UNIX_EXTATTR_CAP)
> > @@ -3285,7 +3285,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
> > return 0;
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > /* Get unique dfs connections */
> > static int mount_get_dfs_conns(struct mount_ctx *mnt_ctx)
> > {
> > @@ -3486,7 +3486,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> > struct cifs_tcon *tcon = mnt_ctx->tcon;
> > struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
> > char *full_path;
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
> > #endif
> >
> > @@ -3505,7 +3505,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> >
> > rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
> > full_path);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > if (nodfs) {
> > if (rc == -EREMOTE)
> > rc = -EOPNOTSUPP;
> > @@ -3536,7 +3536,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > static void set_root_ses(struct mount_ctx *mnt_ctx)
> > {
> > if (mnt_ctx->ses) {
> > @@ -3996,7 +3996,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
> > spin_unlock(&cifs_sb->tlink_tree_lock);
> >
> > kfree(cifs_sb->prepath);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id);
> > #endif
> > call_rcu(&cifs_sb->rcu, delayed_free);
> > @@ -4383,7 +4383,7 @@ cifs_prune_tlinks(struct work_struct *work)
> > TLINK_IDLE_EXPIRE);
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > /* Update dfs referral path of superblock */
> > static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
> > const char *target)
> > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/core.c
> > similarity index 98%
> > rename from fs/cifs/cifsfs.c
> > rename to fs/cifs/core.c
> > index af4c5632490e..8b135c1cd5ae 100644
> > --- a/fs/cifs/cifsfs.c
> > +++ b/fs/cifs/core.c
> > @@ -4,7 +4,7 @@
> > * Copyright (C) International Business Machines Corp., 2002,2008
> > * Author(s): Steve French ([email protected])
> > *
> > - * Common Internet FileSystem (CIFS) client
> > + * SMBFS client
> > *
> > */
> >
> > @@ -28,7 +28,7 @@
> > #include <linux/xattr.h>
> > #include <uapi/linux/magic.h>
> > #include <net/ipv6.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #define DECLARE_GLOBALS_HERE
> > #include "cifsglob.h"
> > @@ -39,10 +39,10 @@
> > #include <linux/key-type.h>
> > #include "cifs_spnego.h"
> > #include "fscache.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > #include "netlink.h"
> > #endif
> > #include "fs_context.h"
> > @@ -90,7 +90,7 @@ atomic_t tconInfoReconnectCount;
> > atomic_t mid_count;
> > atomic_t buf_alloc_count;
> > atomic_t small_buf_alloc_count;
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > atomic_t total_buf_alloc_count;
> > atomic_t total_small_buf_alloc_count;
> > #endif/* STATS2 */
> > @@ -115,7 +115,7 @@ module_param(cifs_max_pending, uint, 0444);
> > MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server for "
> > "CIFS/SMB1 dialect (N/A for SMB3) "
> > "Default: 32767 Range: 2 to 32767.");
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > unsigned int slow_rsp_threshold = 1;
> > module_param(slow_rsp_threshold, uint, 0644);
> > MODULE_PARM_DESC(slow_rsp_threshold, "Amount of time (in seconds) to wait "
> > @@ -266,12 +266,12 @@ cifs_read_super(struct super_block *sb)
> > goto out_no_root;
> > }
> >
> > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
> > cifs_dbg(FYI, "export ops supported\n");
> > sb->s_export_op = &cifs_export_ops;
> > }
> > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> >
> > return 0;
> >
> > @@ -759,7 +759,7 @@ static void cifs_umount_begin(struct super_block *sb)
> > return;
> > }
> >
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > static int cifs_show_stats(struct seq_file *s, struct dentry *root)
> > {
> > /* BB FIXME */
> > @@ -797,7 +797,7 @@ static const struct super_operations cifs_super_ops = {
> > as opens */
> > .show_options = cifs_show_options,
> > .umount_begin = cifs_umount_begin,
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > .show_stats = cifs_show_stats,
> > #endif
> > };
> > @@ -1116,6 +1116,7 @@ struct file_system_type cifs_fs_type = {
> > .fs_flags = FS_RENAME_DOES_D_MOVE,
> > };
> > MODULE_ALIAS_FS("cifs");
> > +MODULE_ALIAS("cifs");
> >
> > struct file_system_type smb3_fs_type = {
> > .owner = THIS_MODULE,
> > @@ -1612,7 +1613,7 @@ init_cifs(void)
> >
> > atomic_set(&buf_alloc_count, 0);
> > atomic_set(&small_buf_alloc_count, 0);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > atomic_set(&total_buf_alloc_count, 0);
> > atomic_set(&total_small_buf_alloc_count, 0);
> > if (slow_rsp_threshold < 1)
> > @@ -1620,7 +1621,7 @@ init_cifs(void)
> > else if (slow_rsp_threshold > 32767)
> > cifs_dbg(VFS,
> > "slow response threshold set higher than recommended (0 to 32767)\n");
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> >
> > atomic_set(&mid_count, 0);
> > GlobalCurrentXid = 0;
> > @@ -1693,21 +1694,21 @@ init_cifs(void)
> > if (rc)
> > goto out_destroy_mids;
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > rc = dfs_cache_init();
> > if (rc)
> > goto out_destroy_request_bufs;
> > -#endif /* CONFIG_CIFS_DFS_UPCALL */
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#endif /* CONFIG_SMBFS_DFS_UPCALL */
> > +#ifdef CONFIG_SMBFS_UPCALL
> > rc = init_cifs_spnego();
> > if (rc)
> > goto out_destroy_dfs_cache;
> > -#endif /* CONFIG_CIFS_UPCALL */
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#endif /* CONFIG_SMBFS_UPCALL */
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > rc = cifs_genl_init();
> > if (rc)
> > goto out_register_key_type;
> > -#endif /* CONFIG_CIFS_SWN_UPCALL */
> > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
> >
> > rc = init_cifs_idmap();
> > if (rc)
> > @@ -1728,15 +1729,15 @@ init_cifs(void)
> > out_init_cifs_idmap:
> > exit_cifs_idmap();
> > out_cifs_swn_init:
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > cifs_genl_exit();
> > out_register_key_type:
> > #endif
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > exit_cifs_spnego();
> > out_destroy_dfs_cache:
> > #endif
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > dfs_cache_destroy();
> > out_destroy_request_bufs:
> > #endif
> > @@ -1768,13 +1769,13 @@ exit_cifs(void)
> > unregister_filesystem(&smb3_fs_type);
> > cifs_dfs_release_automount_timer();
> > exit_cifs_idmap();
> > -#ifdef CONFIG_CIFS_SWN_UPCALL
> > +#ifdef CONFIG_SMBFS_SWN_UPCALL
> > cifs_genl_exit();
> > #endif
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > exit_cifs_spnego();
> > #endif
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > dfs_cache_destroy();
> > #endif
> > cifs_destroy_request_bufs();
> > diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> > index a9b6c3eba6de..f0d2d2c49f9e 100644
> > --- a/fs/cifs/dfs_cache.c
> > +++ b/fs/cifs/dfs_cache.c
> > @@ -334,7 +334,7 @@ const struct proc_ops dfscache_proc_ops = {
> > .proc_write = dfscache_proc_write,
> > };
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > static inline void dump_tgts(const struct cache_entry *ce)
> > {
> > struct cache_dfs_tgt *t;
> > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> > index ce9b22aecfba..5b3728631552 100644
> > --- a/fs/cifs/dir.c
> > +++ b/fs/cifs/dir.c
> > @@ -13,7 +13,7 @@
> > #include <linux/namei.h>
> > #include <linux/mount.h>
> > #include <linux/file.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > diff --git a/fs/cifs/export.c b/fs/cifs/export.c
> > index 37c28415df1e..0395ef73b06d 100644
> > --- a/fs/cifs/export.c
> > +++ b/fs/cifs/export.c
> > @@ -4,8 +4,6 @@
> > * Copyright (C) International Business Machines Corp., 2007
> > * Author(s): Steve French ([email protected])
> > *
> > - * Common Internet FileSystem (CIFS) client
> > - *
> > * Operations related to support for exporting files via NFSD
> > *
> > */
> > @@ -30,9 +28,9 @@
> > #include <linux/exportfs.h>
> > #include "cifsglob.h"
> > #include "cifs_debug.h"
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> >
> > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > static struct dentry *cifs_get_parent(struct dentry *dentry)
> > {
> > /* BB need to add code here eventually to enable export via NFSD */
> > @@ -50,5 +48,5 @@ const struct export_operations cifs_export_ops = {
> > .encode_fs = */
> > };
> >
> > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> >
> > diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> > index a592fdf04313..90567ae51fa7 100644
> > --- a/fs/cifs/file.c
> > +++ b/fs/cifs/file.c
> > @@ -22,7 +22,7 @@
> > #include <linux/swap.h>
> > #include <linux/mm.h>
> > #include <asm/div64.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > @@ -2942,7 +2942,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
> > if (wdata->cfile->invalidHandle)
> > rc = -EAGAIN;
> > else {
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (wdata->mr) {
> > wdata->mr->need_invalidate = true;
> > smbd_deregister_mr(wdata->mr);
> > @@ -3455,7 +3455,7 @@ cifs_readdata_release(struct kref *refcount)
> > {
> > struct cifs_readdata *rdata = container_of(refcount,
> > struct cifs_readdata, refcount);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (rdata->mr) {
> > smbd_deregister_mr(rdata->mr);
> > rdata->mr = NULL;
> > @@ -3599,7 +3599,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
> > if (iter)
> > result = copy_page_from_iter(
> > page, page_offset, n, iter);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > else if (rdata->mr)
> > result = n;
> > #endif
> > @@ -3676,7 +3676,7 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
> > if (rdata->cfile->invalidHandle)
> > rc = -EAGAIN;
> > else {
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (rdata->mr) {
> > rdata->mr->need_invalidate = true;
> > smbd_deregister_mr(rdata->mr);
> > @@ -4212,7 +4212,7 @@ cifs_page_mkwrite(struct vm_fault *vmf)
> > /* Wait for the page to be written to the cache before we allow it to
> > * be modified. We then assume the entire page will need writing back.
> > */
> > -#ifdef CONFIG_CIFS_FSCACHE
> > +#ifdef CONFIG_SMBFS_FSCACHE
> > if (PageFsCache(page) &&
> > wait_on_page_fscache_killable(page) < 0)
> > return VM_FAULT_RETRY;
> > @@ -4367,7 +4367,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
> > if (iter)
> > result = copy_page_from_iter(
> > page, page_offset, n, iter);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > else if (rdata->mr)
> > result = n;
> > #endif
> > @@ -4960,7 +4960,7 @@ static void cifs_swap_deactivate(struct file *file)
> > * Mark a page as having been made dirty and thus needing writeback. We also
> > * need to pin the cache object to write back to.
> > */
> > -#ifdef CONFIG_CIFS_FSCACHE
> > +#ifdef CONFIG_SMBFS_FSCACHE
> > static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
> > {
> > return fscache_dirty_folio(mapping, folio,
> > diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> > index 8dc0d923ef6a..a8366986bf73 100644
> > --- a/fs/cifs/fs_context.c
> > +++ b/fs/cifs/fs_context.c
> > @@ -13,7 +13,7 @@
> > #include <linux/magic.h>
> > #include <linux/security.h>
> > #include <net/net_namespace.h>
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> > */
> > @@ -25,7 +25,7 @@
> > #include <linux/mount.h>
> > #include <linux/parser.h>
> > #include <linux/utsname.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > @@ -339,7 +339,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
> > substring_t args[MAX_OPT_ARGS];
> >
> > switch (match_token(value, cifs_smb_version_tokens, args)) {
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > case Smb_1:
> > if (disable_legacy_dialects) {
> > cifs_errorf(fc, "mount with legacy dialect disabled\n");
> > @@ -825,7 +825,7 @@ static int smb3_reconfigure(struct fs_context *fc)
> > smb3_cleanup_fs_context_contents(cifs_sb->ctx);
> > rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
> > smb3_update_mnt_flags(cifs_sb);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > if (!rc)
> > rc = dfs_cache_remount_fs(cifs_sb);
> > #endif
> > @@ -1291,16 +1291,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> > goto cifs_parse_mount_err;
> > break;
> > case Opt_witness:
> > -#ifndef CONFIG_CIFS_SWN_UPCALL
> > - cifs_errorf(fc, "Witness support needs CONFIG_CIFS_SWN_UPCALL config option\n");
> > +#ifndef CONFIG_SMBFS_SWN_UPCALL
> > + cifs_errorf(fc, "Witness support needs CONFIG_SMBFS_SWN_UPCALL config option\n");
> > goto cifs_parse_mount_err;
> > #endif
> > ctx->witness = true;
> > pr_warn_once("Witness protocol support is experimental\n");
> > break;
> > case Opt_rootfs:
> > -#ifndef CONFIG_CIFS_ROOT
> > - cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
> > +#ifndef CONFIG_SMBFS_ROOT
> > + cifs_dbg(VFS, "rootfs support requires CONFIG_SMBFS_ROOT config option\n");
> > goto cifs_parse_mount_err;
> > #endif
> > ctx->rootfs = true;
> > @@ -1399,8 +1399,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> > pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
> > break;
> > case Opt_fsc:
> > -#ifndef CONFIG_CIFS_FSCACHE
> > - cifs_errorf(fc, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n");
> > +#ifndef CONFIG_SMBFS_FSCACHE
> > + cifs_errorf(fc, "FS-Cache support needs CONFIG_SMBFS_FSCACHE kernel config option set\n");
> > goto cifs_parse_mount_err;
> > #endif
> > ctx->fsc = true;
> > diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
> > index aa3b941a5555..ac2e5eb01af5 100644
> > --- a/fs/cifs/fscache.h
> > +++ b/fs/cifs/fscache.h
> > @@ -33,7 +33,7 @@ struct cifs_fscache_inode_coherency_data {
> > __le32 last_change_time_nsec;
> > };
> >
> > -#ifdef CONFIG_CIFS_FSCACHE
> > +#ifdef CONFIG_SMBFS_FSCACHE
> >
> > /*
> > * fscache.c
> > @@ -119,7 +119,7 @@ static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
> > return true;
> > }
> >
> > -#else /* CONFIG_CIFS_FSCACHE */
> > +#else /* CONFIG_SMBFS_FSCACHE */
> > static inline
> > void cifs_fscache_fill_coherency(struct inode *inode,
> > struct cifs_fscache_inode_coherency_data *cd)
> > @@ -159,6 +159,6 @@ static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
> > return true; /* May release page */
> > }
> >
> > -#endif /* CONFIG_CIFS_FSCACHE */
> > +#endif /* CONFIG_SMBFS_FSCACHE */
> >
> > #endif /* _CIFS_FSCACHE_H */
> > diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> > index 3ad303dd5e5a..9da2c5644960 100644
> > --- a/fs/cifs/inode.c
> > +++ b/fs/cifs/inode.c
> > @@ -14,7 +14,7 @@
> > #include <linux/wait_bit.h>
> > #include <linux/fiemap.h>
> > #include <asm/div64.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > @@ -57,7 +57,7 @@ static void cifs_set_ops(struct inode *inode)
> > inode->i_data.a_ops = &cifs_addr_ops;
> > break;
> > case S_IFDIR:
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > if (IS_AUTOMOUNT(inode)) {
> > inode->i_op = &cifs_dfs_referral_inode_operations;
> > } else {
> > @@ -552,7 +552,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
> > static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
> > struct cifs_sb_info *cifs_sb, unsigned int xid)
> > {
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > ssize_t rc;
> > char ea_value[4];
> > __u32 mode;
> > @@ -956,7 +956,7 @@ cifs_get_inode_info(struct inode **inode,
> > rc = server->ops->query_path_info(xid, tcon, cifs_sb,
> > full_path, tmp_data,
> > &adjust_tz, &is_reparse_point);
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > if (rc == -ENOENT && is_tcon_dfs(tcon))
> > rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon,
> > cifs_sb,
> > @@ -1833,7 +1833,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,
> >
> > d_instantiate(dentry, newinode);
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > cifs_dbg(FYI, "instantiated dentry %p %pd to inode %p\n",
> > dentry, dentry, newinode);
> >
> > diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
> > index 0359b604bdbc..01f70c5352fd 100644
> > --- a/fs/cifs/ioctl.c
> > +++ b/fs/cifs/ioctl.c
> > @@ -17,7 +17,7 @@
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > #include "cifs_debug.h"
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifs_ioctl.h"
> > #include "smb2proto.h"
> > #include "smb2glob.h"
> > @@ -332,7 +332,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> > break;
> > tcon = tlink_tcon(pSMBFile->tlink);
> > caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > if (CIFS_UNIX_EXTATTR_CAP & caps) {
> > __u64 ExtAttrMask = 0;
> > rc = CIFSGetExtAttr(xid, tcon,
> > @@ -345,7 +345,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> > if (rc != EOPNOTSUPP)
> > break;
> > }
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> > rc = 0;
> > if (CIFS_I(inode)->cifsAttrs & ATTR_COMPRESSED) {
> > /* add in the compressed bit */
> > diff --git a/fs/cifs/link.c b/fs/cifs/link.c
> > index bbdf3281559c..640a8724ac8e 100644
> > --- a/fs/cifs/link.c
> > +++ b/fs/cifs/link.c
> > @@ -9,7 +9,7 @@
> > #include <linux/stat.h>
> > #include <linux/slab.h>
> > #include <linux/namei.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
> > index 7a906067db04..5b03978e658c 100644
> > --- a/fs/cifs/misc.c
> > +++ b/fs/cifs/misc.c
> > @@ -18,8 +18,8 @@
> > #include "nterr.h"
> > #include "cifs_unicode.h"
> > #include "smb2pdu.h"
> > -#include "cifsfs.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#include "smbfs.h"
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dns_resolve.h"
> > #endif
> > #include "fs_context.h"
> > @@ -175,9 +175,9 @@ cifs_buf_get(void)
> > /* for most paths, more is cleared in header_assemble */
> > memset(ret_buf, 0, buf_size + 3);
> > atomic_inc(&buf_alloc_count);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > atomic_inc(&total_buf_alloc_count);
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> >
> > return ret_buf;
> > }
> > @@ -208,9 +208,9 @@ cifs_small_buf_get(void)
> > /* No need to clear memory here, cleared in header assemble */
> > /* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
> > atomic_inc(&small_buf_alloc_count);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > atomic_inc(&total_small_buf_alloc_count);
> > -#endif /* CONFIG_CIFS_STATS2 */
> > +#endif /* CONFIG_SMBFS_STATS2 */
> >
> > return ret_buf;
> > }
> > @@ -1246,7 +1246,7 @@ void cifs_put_tcp_super(struct super_block *sb)
> > __cifs_put_super(sb);
> > }
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > int match_target_ip(struct TCP_Server_Info *server,
> > const char *share, size_t share_len,
> > bool *result)
> > diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
> > index 28caae7aed1b..8d461b29c0e2 100644
> > --- a/fs/cifs/netmisc.c
> > +++ b/fs/cifs/netmisc.c
> > @@ -16,7 +16,7 @@
> > #include <asm/div64.h>
> > #include <asm/byteorder.h>
> > #include <linux/inet.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
> > index 55758b9ec877..d22bf9591c3c 100644
> > --- a/fs/cifs/ntlmssp.h
> > +++ b/fs/cifs/ntlmssp.h
> > @@ -93,7 +93,7 @@ typedef struct _NEGOTIATE_MESSAGE {
> > struct ntlmssp_version {
> > __u8 ProductMajorVersion;
> > __u8 ProductMinorVersion;
> > - __le16 ProductBuild; /* we send the cifs.ko module version here */
> > + __le16 ProductBuild; /* we send the module version here */
> > __u8 Reserved[3];
> > __u8 NTLMRevisionCurrent; /* currently 0x0F */
> > } __packed;
> > diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
> > index 384cabdf47ca..acfe26e3ec0e 100644
> > --- a/fs/cifs/readdir.c
> > +++ b/fs/cifs/readdir.c
> > @@ -18,7 +18,7 @@
> > #include "cifs_unicode.h"
> > #include "cifs_debug.h"
> > #include "cifs_fs_sb.h"
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "smb2proto.h"
> > #include "fs_context.h"
> >
> > @@ -29,7 +29,7 @@
> > */
> > #define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2)
> >
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > static void dump_cifs_file_struct(struct file *file, char *label)
> > {
> > struct cifsFileInfo *cf;
> > diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> > index 02c8b2906196..a6288850c7cc 100644
> > --- a/fs/cifs/sess.c
> > +++ b/fs/cifs/sess.c
> > @@ -18,7 +18,7 @@
> > #include <linux/utsname.h>
> > #include <linux/slab.h>
> > #include <linux/version.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifs_spnego.h"
> > #include "smb2proto.h"
> > #include "fs_context.h"
> > @@ -1376,7 +1376,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data)
> > ses->auth_key.response = NULL;
> > }
> >
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > static void
> > sess_auth_kerberos(struct sess_data *sess_data)
> > {
> > @@ -1515,7 +1515,7 @@ sess_auth_kerberos(struct sess_data *sess_data)
> > ses->auth_key.response = NULL;
> > }
> >
> > -#endif /* ! CONFIG_CIFS_UPCALL */
> > +#endif /* ! CONFIG_SMBFS_UPCALL */
> >
> > /*
> > * The required kvec buffers have to be allocated before calling this
> > @@ -1792,13 +1792,13 @@ static int select_sec(struct sess_data *sess_data)
> > sess_data->func = sess_auth_ntlmv2;
> > break;
> > case Kerberos:
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > sess_data->func = sess_auth_kerberos;
> > break;
> > #else
> > cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
> > return -ENOSYS;
> > -#endif /* CONFIG_CIFS_UPCALL */
> > +#endif /* CONFIG_SMBFS_UPCALL */
> > case RawNTLMSSP:
> > sess_data->func = sess_auth_rawntlmssp_negotiate;
> > break;
> > diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
> > index f36b2d2d40ca..f60b6696a1c1 100644
> > --- a/fs/cifs/smb1ops.c
> > +++ b/fs/cifs/smb1ops.c
> > @@ -926,7 +926,7 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
> > const unsigned char *searchName, char **symlinkinfo,
> > const struct nls_table *nls_codepage)
> > {
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > int rc;
> > struct dfs_info3_param referral = {0};
> >
> > @@ -1226,7 +1226,7 @@ struct smb_version_operations smb1_operations = {
> > .wp_retry_size = cifs_wp_retry_size,
> > .dir_needs_close = cifs_dir_needs_close,
> > .select_sectype = cifs_select_sectype,
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > .query_all_EAs = CIFSSMBQAllEAs,
> > .set_EA = CIFSSMBSetEA,
> > #endif /* CIFS_XATTR */
> > diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
> > index f5dcc4940b6d..82887064569a 100644
> > --- a/fs/cifs/smb2file.c
> > +++ b/fs/cifs/smb2file.c
> > @@ -11,7 +11,7 @@
> > #include <linux/slab.h>
> > #include <linux/pagemap.h>
> > #include <asm/div64.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
> > index 8571a459c710..66b2d03ea231 100644
> > --- a/fs/cifs/smb2inode.c
> > +++ b/fs/cifs/smb2inode.c
> > @@ -12,7 +12,7 @@
> > #include <linux/slab.h>
> > #include <linux/pagemap.h>
> > #include <asm/div64.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> > index 82dd2e973753..012b8b8a96ba 100644
> > --- a/fs/cifs/smb2ops.c
> > +++ b/fs/cifs/smb2ops.c
> > @@ -14,7 +14,7 @@
> > #include <crypto/aead.h>
> > #include <linux/fiemap.h>
> > #include <uapi/linux/magic.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifsglob.h"
> > #include "smb2pdu.h"
> > #include "smb2proto.h"
> > @@ -379,7 +379,7 @@ smb2_find_dequeue_mid(struct TCP_Server_Info *server, char *buf)
> > static void
> > smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
> > {
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
> >
> > cifs_server_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n",
> > @@ -437,7 +437,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> > /* start with specified wsize, or default */
> > wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
> > wsize = min_t(unsigned int, wsize, server->max_write);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (server->rdma) {
> > if (server->sign)
> > /*
> > @@ -485,7 +485,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> > /* start with specified rsize, or default */
> > rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
> > rsize = min_t(unsigned int, rsize, server->max_read);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (server->rdma) {
> > if (server->sign)
> > /*
> > @@ -930,7 +930,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
> > o_rsp = (struct smb2_create_rsp *)rsp_iov[0].iov_base;
> > oparms.fid->persistent_fid = o_rsp->PersistentFileId;
> > oparms.fid->volatile_fid = o_rsp->VolatileFileId;
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > oparms.fid->mid = le64_to_cpu(o_rsp->hdr.MessageId);
> > #endif /* CIFS_DEBUG2 */
> >
> > @@ -1132,7 +1132,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > static ssize_t
> > move_smb2_ea_to_cifs(char *dst, size_t dst_size,
> > struct smb2_file_full_ea_info *src, size_t src_size,
> > @@ -1544,7 +1544,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
> > cfile->fid.persistent_fid = fid->persistent_fid;
> > cfile->fid.volatile_fid = fid->volatile_fid;
> > cfile->fid.access = fid->access;
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > cfile->fid.mid = fid->mid;
> > #endif /* CIFS_DEBUG2 */
> > server->ops->set_oplock_level(cinode, oplock, fid->epoch,
> > @@ -4352,7 +4352,7 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
> > }
> > }
> >
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > static bool
> > smb2_is_read_op(__u32 oplock)
> > {
> > @@ -4941,7 +4941,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid,
> > }
> >
> > data_offset = server->ops->read_data_offset(buf);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > use_rdma_mr = rdata->mr;
> > #endif
> > data_len = server->ops->read_data_length(buf, use_rdma_mr);
> > @@ -5073,7 +5073,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
> > dw->ppages, dw->npages, dw->len,
> > true);
> > if (rc >= 0) {
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > mid->when_received = jiffies;
> > #endif
> > if (dw->server->ops->is_network_name_deleted)
> > @@ -5460,7 +5460,7 @@ smb2_make_node(unsigned int xid, struct inode *inode,
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > struct smb_version_operations smb20_operations = {
> > .compare_fids = smb2_compare_fids,
> > .setup_request = smb2_setup_request,
> > @@ -5544,7 +5544,7 @@ struct smb_version_operations smb20_operations = {
> > .dir_needs_close = smb2_dir_needs_close,
> > .get_dfs_refer = smb2_get_dfs_refer,
> > .select_sectype = smb2_select_sectype,
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > .query_all_EAs = smb2_query_eas,
> > .set_EA = smb2_set_ea,
> > #endif /* CIFS_XATTR */
> > @@ -5647,7 +5647,7 @@ struct smb_version_operations smb21_operations = {
> > .notify = smb3_notify,
> > .get_dfs_refer = smb2_get_dfs_refer,
> > .select_sectype = smb2_select_sectype,
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > .query_all_EAs = smb2_query_eas,
> > .set_EA = smb2_set_ea,
> > #endif /* CIFS_XATTR */
> > @@ -5761,7 +5761,7 @@ struct smb_version_operations smb30_operations = {
> > .receive_transform = smb3_receive_transform,
> > .get_dfs_refer = smb2_get_dfs_refer,
> > .select_sectype = smb2_select_sectype,
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > .query_all_EAs = smb2_query_eas,
> > .set_EA = smb2_set_ea,
> > #endif /* CIFS_XATTR */
> > @@ -5875,7 +5875,7 @@ struct smb_version_operations smb311_operations = {
> > .receive_transform = smb3_receive_transform,
> > .get_dfs_refer = smb2_get_dfs_refer,
> > .select_sectype = smb2_select_sectype,
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > .query_all_EAs = smb2_query_eas,
> > .set_EA = smb2_set_ea,
> > #endif /* CIFS_XATTR */
> > @@ -5891,7 +5891,7 @@ struct smb_version_operations smb311_operations = {
> > .is_network_name_deleted = smb2_is_network_name_deleted,
> > };
> >
> > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> > struct smb_version_values smb20_values = {
> > .version_string = SMB20_VERSION_STRING,
> > .protocol_id = SMB20_PROT_ID,
> > diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> > index 131bec79d6fd..86decb4642aa 100644
> > --- a/fs/cifs/smb2pdu.c
> > +++ b/fs/cifs/smb2pdu.c
> > @@ -36,7 +36,7 @@
> > #include "cifs_spnego.h"
> > #include "smbdirect.h"
> > #include "trace.h"
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > #include "dfs_cache.h"
> > #endif
> >
> > @@ -1319,7 +1319,7 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
> > else
> > req->SecurityMode = 0;
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
> > #else
> > req->Capabilities = 0;
> > @@ -1402,7 +1402,7 @@ SMB2_sess_establish_session(struct SMB2_sess_data *sess_data)
> > return rc;
> > }
> >
> > -#ifdef CONFIG_CIFS_UPCALL
> > +#ifdef CONFIG_SMBFS_UPCALL
> > static void
> > SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
> > {
> > @@ -1638,7 +1638,7 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
> > }
> >
> > rc = SMB2_sess_establish_session(sess_data);
> > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> > if (ses->server->dialect < SMB30_PROT_ID) {
> > cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
> > /*
> > @@ -3026,7 +3026,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
> > oparms->fid->persistent_fid = rsp->PersistentFileId;
> > oparms->fid->volatile_fid = rsp->VolatileFileId;
> > oparms->fid->access = oparms->desired_access;
> > -#ifdef CONFIG_CIFS_DEBUG2
> > +#ifdef CONFIG_SMBFS_DEBUG2
> > oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
> > #endif /* CIFS_DEBUG2 */
> >
> > @@ -4057,7 +4057,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
> > io_parms->persistent_fid,
> > io_parms->tcon->tid, io_parms->tcon->ses->Suid,
> > io_parms->offset, io_parms->length);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > /*
> > * If we want to do a RDMA write, fill in and append
> > * smbd_buffer_descriptor_v1 to the end of read request
> > @@ -4177,7 +4177,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
> > default:
> > rdata->result = -EIO;
> > }
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > /*
> > * If this rdata has a memmory registered, the MR can be freed
> > * MR needs to be freed as soon as I/O finishes to prevent deadlock
> > @@ -4411,7 +4411,7 @@ smb2_writev_callback(struct mid_q_entry *mid)
> > wdata->result = -EIO;
> > break;
> > }
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > /*
> > * If this wdata has a memory registered, the MR can be freed
> > * The number of MRs available is limited, it's important to recover
> > @@ -4484,7 +4484,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> >
> > trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid,
> > tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes);
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > /*
> > * If we want to do a server RDMA read, fill in and append
> > * smbd_buffer_descriptor_v1 to the end of write request
> > @@ -4536,7 +4536,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> > rqst.rq_npages = wdata->nr_pages;
> > rqst.rq_pagesz = wdata->pagesz;
> > rqst.rq_tailsz = wdata->tailsz;
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > if (wdata->mr) {
> > iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
> > rqst.rq_npages = 0;
> > @@ -4545,7 +4545,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> > cifs_dbg(FYI, "async write at %llu %u bytes\n",
> > wdata->offset, wdata->bytes);
> >
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > /* For RDMA read, I/O size is in RemainingBytes not in Length */
> > if (!wdata->mr)
> > req->Length = cpu_to_le32(wdata->bytes);
> > diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
> > index f64922f340b3..00313a488e6f 100644
> > --- a/fs/cifs/smb2transport.c
> > +++ b/fs/cifs/smb2transport.c
> > @@ -454,7 +454,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
> > if (rc)
> > return rc;
> >
> > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> > cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);
> > /*
> > * The session id is opaque in terms of endianness, so we can't
> > diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
> > index a87fca82a796..922344c8d5c1 100644
> > --- a/fs/cifs/smbdirect.h
> > +++ b/fs/cifs/smbdirect.h
> > @@ -7,7 +7,7 @@
> > #ifndef _SMBDIRECT_H
> > #define _SMBDIRECT_H
> >
> > -#ifdef CONFIG_CIFS_SMB_DIRECT
> > +#ifdef CONFIG_SMBFS_SMB_DIRECT
> > #define cifs_rdma_enabled(server) ((server)->rdma)
> >
> > #include "cifsglob.h"
> > diff --git a/fs/cifs/cifsfs.h b/fs/cifs/smbfs.h
> > similarity index 97%
> > rename from fs/cifs/cifsfs.h
> > rename to fs/cifs/smbfs.h
> > index 81f4c15936d0..d067be5d3184 100644
> > --- a/fs/cifs/cifsfs.h
> > +++ b/fs/cifs/smbfs.h
> > @@ -115,7 +115,7 @@ extern int cifs_readdir(struct file *file, struct dir_context *ctx);
> > extern const struct dentry_operations cifs_dentry_ops;
> > extern const struct dentry_operations cifs_ci_dentry_ops;
> >
> > -#ifdef CONFIG_CIFS_DFS_UPCALL
> > +#ifdef CONFIG_SMBFS_DFS_UPCALL
> > extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
> > #else
> > #define cifs_dfs_d_automount NULL
> > @@ -127,12 +127,12 @@ extern const char *cifs_get_link(struct dentry *, struct inode *,
> > extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
> > struct dentry *direntry, const char *symname);
> >
> > -#ifdef CONFIG_CIFS_XATTR
> > +#ifdef CONFIG_SMBFS_XATTR
> > extern const struct xattr_handler *cifs_xattr_handlers[];
> > extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
> > #else
> > -# define cifs_xattr_handlers NULL
> > -# define cifs_listxattr NULL
> > +#define cifs_xattr_handlers NULL
> > +#define cifs_listxattr NULL
> > #endif
> >
> > extern ssize_t cifs_file_copychunk_range(unsigned int xid,
> > @@ -148,9 +148,9 @@ struct smb3_fs_context;
> > extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
> > int flags, struct smb3_fs_context *ctx);
> >
> > -#ifdef CONFIG_CIFS_NFSD_EXPORT
> > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> > extern const struct export_operations cifs_export_ops;
> > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
> >
> > /* when changing internal version - update following two lines at same time */
> > #define SMB3_PRODUCT_BUILD 38
> > diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
> > index 160463e22c95..cd689b47d0d9 100644
> > --- a/fs/cifs/transport.c
> > +++ b/fs/cifs/transport.c
> > @@ -77,7 +77,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> > {
> > struct mid_q_entry *midEntry =
> > container_of(refcount, struct mid_q_entry, refcount);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > __le16 command = midEntry->server->vals->lock_cmd;
> > __u16 smb_cmd = le16_to_cpu(midEntry->command);
> > unsigned long now;
> > @@ -96,7 +96,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> > cifs_buf_release(midEntry->resp_buf);
> > else
> > cifs_small_buf_release(midEntry->resp_buf);
> > -#ifdef CONFIG_CIFS_STATS2
> > +#ifdef CONFIG_SMBFS_STATS2
> > now = jiffies;
> > if (now < midEntry->when_alloc)
> > cifs_server_dbg(VFS, "Invalid mid allocation time\n");
> > diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> > index 9d486fbbfbbd..bce40126e1a9 100644
> > --- a/fs/cifs/xattr.c
> > +++ b/fs/cifs/xattr.c
> > @@ -10,7 +10,7 @@
> > #include <linux/posix_acl_xattr.h>
> > #include <linux/slab.h>
> > #include <linux/xattr.h>
> > -#include "cifsfs.h"
> > +#include "smbfs.h"
> > #include "cifspdu.h"
> > #include "cifsglob.h"
> > #include "cifsproto.h"
> > @@ -202,7 +202,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > }
> >
> > case XATTR_ACL_ACCESS:
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > if (!value)
> > goto out;
> > if (sb->s_flags & SB_POSIXACL)
> > @@ -210,11 +210,11 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > value, (const int)size,
> > ACL_TYPE_ACCESS, cifs_sb->local_nls,
> > cifs_remap(cifs_sb));
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> > break;
> >
> > case XATTR_ACL_DEFAULT:
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > if (!value)
> > goto out;
> > if (sb->s_flags & SB_POSIXACL)
> > @@ -222,7 +222,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> > value, (const int)size,
> > ACL_TYPE_DEFAULT, cifs_sb->local_nls,
> > cifs_remap(cifs_sb));
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> > break;
> > }
> >
> > @@ -366,23 +366,23 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
> > }
> >
> > case XATTR_ACL_ACCESS:
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > if (sb->s_flags & SB_POSIXACL)
> > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> > value, size, ACL_TYPE_ACCESS,
> > cifs_sb->local_nls,
> > cifs_remap(cifs_sb));
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> > break;
> >
> > case XATTR_ACL_DEFAULT:
> > -#ifdef CONFIG_CIFS_POSIX
> > +#ifdef CONFIG_SMBFS_POSIX
> > if (sb->s_flags & SB_POSIXACL)
> > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> > value, size, ACL_TYPE_DEFAULT,
> > cifs_sb->local_nls,
> > cifs_remap(cifs_sb));
> > -#endif /* CONFIG_CIFS_POSIX */
> > +#endif /* CONFIG_SMBFS_POSIX */
> > break;
> > }
> >
> > --
> > 2.35.3
> >
>
>
> --
> Thanks,
>
> Steve



--
Thanks,

Steve

2023-07-26 21:35:17

by Steve French

[permalink] [raw]
Subject: Re: [RFC PATCH 1/3] cifs: change module name to "smbfs.ko"

I like the idea but am curious about other's opinions.

On Mon, Aug 1, 2022 at 2:09 PM Enzo Matsumiya <[email protected]> wrote:
>
> Rename "cifs.ko" module to "smbfs.ko", but keep "cifs" as a module alias
> for compatibility with existing scripts/tools.
>
> TODO: update spnego and idmap key names, cifs-utils, etc, warn about
> module rename
> To discuss: procfs entries (/proc/fs/cifs)
>
> Signed-off-by: Enzo Matsumiya <[email protected]>
> ---
> fs/Kconfig | 4 +-
> fs/Makefile | 2 +-
> fs/cifs/Kconfig | 108 +++++++++++++++++-----------------
> fs/cifs/Makefile | 24 ++++----
> fs/cifs/cifs_debug.c | 72 +++++++++++------------
> fs/cifs/cifs_debug.h | 4 +-
> fs/cifs/cifs_dfs_ref.c | 2 +-
> fs/cifs/cifs_spnego.c | 4 +-
> fs/cifs/cifs_swn.h | 4 +-
> fs/cifs/cifsacl.c | 6 +-
> fs/cifs/cifsglob.h | 26 ++++----
> fs/cifs/cifspdu.h | 6 +-
> fs/cifs/cifsproto.h | 10 ++--
> fs/cifs/cifssmb.c | 14 ++---
> fs/cifs/connect.c | 36 ++++++------
> fs/cifs/{cifsfs.c => core.c} | 49 +++++++--------
> fs/cifs/dfs_cache.c | 2 +-
> fs/cifs/dir.c | 2 +-
> fs/cifs/export.c | 8 +--
> fs/cifs/file.c | 16 ++---
> fs/cifs/fs_context.c | 20 +++----
> fs/cifs/fscache.h | 6 +-
> fs/cifs/inode.c | 10 ++--
> fs/cifs/ioctl.c | 6 +-
> fs/cifs/link.c | 2 +-
> fs/cifs/misc.c | 14 ++---
> fs/cifs/netmisc.c | 2 +-
> fs/cifs/ntlmssp.h | 2 +-
> fs/cifs/readdir.c | 4 +-
> fs/cifs/sess.c | 10 ++--
> fs/cifs/smb1ops.c | 4 +-
> fs/cifs/smb2file.c | 2 +-
> fs/cifs/smb2inode.c | 2 +-
> fs/cifs/smb2ops.c | 32 +++++-----
> fs/cifs/smb2pdu.c | 22 +++----
> fs/cifs/smb2transport.c | 2 +-
> fs/cifs/smbdirect.h | 2 +-
> fs/cifs/{cifsfs.h => smbfs.h} | 12 ++--
> fs/cifs/transport.c | 4 +-
> fs/cifs/xattr.c | 18 +++---
> 40 files changed, 287 insertions(+), 288 deletions(-)
> rename fs/cifs/{cifsfs.c => core.c} (98%)
> rename fs/cifs/{cifsfs.h => smbfs.h} (97%)
>
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 5976eb33535f..860ca257c681 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -377,8 +377,8 @@ source "fs/ksmbd/Kconfig"
>
> config SMBFS_COMMON
> tristate
> - default y if CIFS=y || SMB_SERVER=y
> - default m if CIFS=m || SMB_SERVER=m
> + default y if SMBFS=y || SMB_SERVER=y
> + default m if SMBFS=m || SMB_SERVER=m
>
> source "fs/coda/Kconfig"
> source "fs/afs/Kconfig"
> diff --git a/fs/Makefile b/fs/Makefile
> index 208a74e0b00e..a07039e124ce 100644
> --- a/fs/Makefile
> +++ b/fs/Makefile
> @@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
> obj-y += unicode/
> obj-$(CONFIG_SYSV_FS) += sysv/
> obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
> -obj-$(CONFIG_CIFS) += cifs/
> +obj-$(CONFIG_SMBFS) += cifs/
> obj-$(CONFIG_SMB_SERVER) += ksmbd/
> obj-$(CONFIG_HPFS_FS) += hpfs/
> obj-$(CONFIG_NTFS_FS) += ntfs/
> diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
> index 3b7e3b9e4fd2..c2157720ffc1 100644
> --- a/fs/cifs/Kconfig
> +++ b/fs/cifs/Kconfig
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only
> -config CIFS
> - tristate "SMB3 and CIFS support (advanced network filesystem)"
> +config SMBFS
> + tristate "SMBFS support (protocol versions 1, 2, and 3)"
> depends on INET
> select NLS
> select CRYPTO
> @@ -37,9 +37,9 @@ config CIFS
> and similar very old servers.
>
> This module provides an advanced network file system client
> - for mounting to SMB3 (and CIFS) compliant servers. It includes
> - support for DFS (hierarchical name space), secure per-user
> - session establishment via Kerberos or NTLM or NTLMv2, RDMA
> + for mounting to SMB-compliant servers. It includes support for
> + DFS (hierarchical name space), secure per-user session
> + establishment via Kerberos or NTLM or NTLMv2, RDMA
> (smbdirect), advanced security features, per-share encryption,
> directory leases, safe distributed caching (oplock), optional packet
> signing, Unicode and other internationalization improvements.
> @@ -47,29 +47,29 @@ config CIFS
> In general, the default dialects, SMB3 and later, enable better
> performance, security and features, than would be possible with CIFS.
> Note that when mounting to Samba, due to the CIFS POSIX extensions,
> - CIFS mounts can provide slightly better POSIX compatibility
> + SMBFS mounts can provide slightly better POSIX compatibility
> than SMB3 mounts. SMB2/SMB3 mount options are also
> slightly simpler (compared to CIFS) due to protocol improvements.
>
> If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y.
>
> -config CIFS_STATS2
> +config SMBFS_STATS2
> bool "Extended statistics"
> - depends on CIFS
> + depends on SMBFS
> default y
> help
> Enabling this option will allow more detailed statistics on SMB
> request timing to be displayed in /proc/fs/cifs/DebugData and also
> allow optional logging of slow responses to dmesg (depending on the
> - value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/cifs/usage.rst
> + value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/smbfs/usage.rst
> for more details. These additional statistics may have a minor effect
> on performance and memory utilization.
>
> If unsure, say Y.
>
> -config CIFS_ALLOW_INSECURE_LEGACY
> +config SMBFS_ALLOW_INSECURE_LEGACY
> bool "Support legacy servers which use less secure dialects"
> - depends on CIFS
> + depends on SMBFS
> default y
> help
> Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
> @@ -78,69 +78,69 @@ config CIFS_ALLOW_INSECURE_LEGACY
> of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.
>
> Disabling this option prevents users from using vers=1.0 or vers=2.0
> - on mounts with cifs.ko
> + on mounts with smbfs.ko
>
> If unsure, say Y.
>
> -config CIFS_UPCALL
> +config SMBFS_UPCALL
> bool "Kerberos/SPNEGO advanced session setup"
> - depends on CIFS
> + depends on SMBFS
> help
> - Enables an upcall mechanism for CIFS which accesses userspace helper
> + Enables an upcall mechanism for SMBFS which accesses userspace helper
> utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
> which are needed to mount to certain secure servers (for which more
> secure Kerberos authentication is required). If unsure, say Y.
>
> -config CIFS_XATTR
> +config SMBFS_XATTR
> bool "CIFS extended attributes"
> - depends on CIFS
> + depends on SMBFS
> help
> Extended attributes are name:value pairs associated with inodes by
> the kernel or by users (see the attr(5) manual page for details).
> - CIFS maps the name of extended attributes beginning with the user
> + SMBFS maps the name of extended attributes beginning with the user
> namespace prefix to SMB/CIFS EAs. EAs are stored on Windows
> servers without the user namespace prefix, but their names are
> - seen by Linux cifs clients prefaced by the user namespace prefix.
> + seen by Linux SMBFS clients prefaced by the user namespace prefix.
> The system namespace (used by some filesystems to store ACLs) is
> not supported at this time.
>
> If unsure, say Y.
>
> -config CIFS_POSIX
> - bool "CIFS POSIX Extensions"
> - depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
> +config SMBFS_POSIX
> + bool "SMBFS POSIX Extensions"
> + depends on SMBFS && SMBFS_ALLOW_INSECURE_LEGACY && SMBFS_XATTR
> help
> - Enabling this option will cause the cifs client to attempt to
> + Enabling this option will cause SMBFS to attempt to
> negotiate a newer dialect with servers, such as Samba 3.0.5
> or later, that optionally can handle more POSIX like (rather
> than Windows like) file behavior. It also enables
> support for POSIX ACLs (getfacl and setfacl) to servers
> (such as Samba 3.10 and later) which can negotiate
> - CIFS POSIX ACL support. If unsure, say N.
> + SMBFS POSIX ACL support. If unsure, say N.
>
> -config CIFS_DEBUG
> - bool "Enable CIFS debugging routines"
> +config SMBFS_DEBUG
> + bool "Enable SMBFS debugging routines"
> default y
> - depends on CIFS
> + depends on SMBFS
> help
> Enabling this option adds helpful debugging messages to
> - the cifs code which increases the size of the cifs module.
> + the SMBFS code which increases the size of the module.
> If unsure, say Y.
>
> -config CIFS_DEBUG2
> - bool "Enable additional CIFS debugging routines"
> - depends on CIFS_DEBUG
> +config SMBFS_DEBUG2
> + bool "Enable additional SMBFS debugging routines"
> + depends on SMBFS_DEBUG
> help
> Enabling this option adds a few more debugging routines
> - to the cifs code which slightly increases the size of
> - the cifs module and can cause additional logging of debug
> + to the SMBFS code which slightly increases the size of
> + the module and can cause additional logging of debug
> messages in some error paths, slowing performance. This
> option can be turned off unless you are debugging
> - cifs problems. If unsure, say N.
> + SMBFS problems. If unsure, say N.
>
> -config CIFS_DEBUG_DUMP_KEYS
> +config SMBFS_DEBUG_DUMP_KEYS
> bool "Dump encryption keys for offline decryption (Unsafe)"
> - depends on CIFS_DEBUG
> + depends on SMBFS_DEBUG
> help
> Enabling this will dump the encryption and decryption keys
> used to communicate on an encrypted share connection on the
> @@ -148,55 +148,55 @@ config CIFS_DEBUG_DUMP_KEYS
> encrypted network captures. Enable this carefully.
> If unsure, say N.
>
> -config CIFS_DFS_UPCALL
> +config SMBFS_DFS_UPCALL
> bool "DFS feature support"
> - depends on CIFS
> + depends on SMBFS
> help
> Distributed File System (DFS) support is used to access shares
> transparently in an enterprise name space, even if the share
> moves to a different server. This feature also enables
> - an upcall mechanism for CIFS which contacts userspace helper
> + an upcall mechanism for SMBFS which contacts userspace helper
> utilities to provide server name resolution (host names to
> IP addresses) which is needed in order to reconnect to
> servers if their addresses change or for implicit mounts of
> DFS junction points. If unsure, say Y.
>
> -config CIFS_SWN_UPCALL
> +config SMBFS_SWN_UPCALL
> bool "SWN feature support"
> - depends on CIFS
> + depends on SMBFS
> help
> The Service Witness Protocol (SWN) is used to get notifications
> from a highly available server of resource state changes. This
> - feature enables an upcall mechanism for CIFS which contacts a
> + feature enables an upcall mechanism for SMBFS which contacts a
> userspace daemon to establish the DCE/RPC connection to retrieve
> the cluster available interfaces and resource change notifications.
> If unsure, say Y.
>
> -config CIFS_NFSD_EXPORT
> - bool "Allow nfsd to export CIFS file system"
> - depends on CIFS && BROKEN
> +config SMBFS_NFSD_EXPORT
> + bool "Allow nfsd to export SMBFS file system"
> + depends on SMBFS && BROKEN
> help
> - Allows NFS server to export a CIFS mounted share (nfsd over cifs)
> + Allows NFS server to export a SMBFS mounted share (nfsd over SMBFS)
>
> -config CIFS_SMB_DIRECT
> +config SMBFS_SMB_DIRECT
> bool "SMB Direct support"
> - depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> + depends on SMBFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMBFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
> help
> Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
> SMB Direct allows transferring SMB packets over RDMA. If unsure,
> say Y.
>
> -config CIFS_FSCACHE
> - bool "Provide CIFS client caching support"
> - depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
> +config SMBFS_FSCACHE
> + bool "Provide SMBFS client caching support"
> + depends on SMBFS=m && FSCACHE || SMBFS=y && FSCACHE=y
> help
> - Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
> + Makes SMBFS FS-Cache capable. Say Y here if you want your SMBFS data
> to be cached locally on disk through the general filesystem cache
> manager. If unsure, say N.
>
> -config CIFS_ROOT
> +config SMBFS_ROOT
> bool "SMB root file system (Experimental)"
> - depends on CIFS=y && IP_PNP
> + depends on SMBFS=y && IP_PNP
> help
> Enables root file system support over SMB protocol.
>
> diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
> index 8c9f2c00be72..07096b742b1d 100644
> --- a/fs/cifs/Makefile
> +++ b/fs/cifs/Makefile
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: GPL-2.0
> #
> -# Makefile for Linux CIFS/SMB2/SMB3 VFS client
> +# Makefile for Linux SMBFS VFS client
> #
> -ccflags-y += -I$(src) # needed for trace events
> -obj-$(CONFIG_CIFS) += cifs.o
> +ccflags-y += -I$(src) # needed for trace events
> +obj-$(CONFIG_SMBFS) += smbfs.o
>
> -cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> +smbfs-y := trace.o core.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
> inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
> cifs_unicode.o nterr.o cifsencrypt.o \
> readdir.o ioctl.o sess.o export.o unc.o winucase.o \
> @@ -17,18 +17,18 @@ $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h
>
> $(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h
>
> -cifs-$(CONFIG_CIFS_XATTR) += xattr.o
> +smbfs-$(CONFIG_SMBFS_XATTR) += xattr.o
>
> -cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
> +smbfs-$(CONFIG_SMBFS_UPCALL) += cifs_spnego.o
>
> -cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
> +smbfs-$(CONFIG_SMBFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
>
> -cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
> +smbfs-$(CONFIG_SMBFS_SWN_UPCALL) += netlink.o cifs_swn.o
>
> -cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
> +smbfs-$(CONFIG_SMBFS_FSCACHE) += fscache.o
>
> -cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
> +smbfs-$(CONFIG_SMBFS_SMB_DIRECT) += smbdirect.o
>
> -cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
> +smbfs-$(CONFIG_SMBFS_ROOT) += cifsroot.o
>
> -cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> +smbfs-$(CONFIG_SMBFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
> diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
> index 11fd85de7217..ae588a8caa90 100644
> --- a/fs/cifs/cifs_debug.c
> +++ b/fs/cifs/cifs_debug.c
> @@ -15,12 +15,12 @@
> #include "cifsglob.h"
> #include "cifsproto.h"
> #include "cifs_debug.h"
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "fs_context.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> #include "smbdirect.h"
> #endif
> #include "cifs_swn.h"
> @@ -35,7 +35,7 @@ cifs_dump_mem(char *label, void *data, int length)
>
> void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> {
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> struct smb_hdr *smb = buf;
>
> cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
> @@ -43,12 +43,12 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
> smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
> cifs_dbg(VFS, "smb buf %p len %u\n", smb,
> server->ops->calc_smb_size(smb, server));
> -#endif /* CONFIG_CIFS_DEBUG2 */
> +#endif /* CONFIG_SMBFS_DEBUG2 */
> }
>
> void cifs_dump_mids(struct TCP_Server_Info *server)
> {
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> struct mid_q_entry *mid_entry;
>
> if (server == NULL)
> @@ -63,7 +63,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> mid_entry->pid,
> mid_entry->callback_data,
> mid_entry->mid);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
> mid_entry->large_buf,
> mid_entry->resp_buf,
> @@ -79,7 +79,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
> }
> }
> spin_unlock(&server->mid_lock);
> -#endif /* CONFIG_CIFS_DEBUG2 */
> +#endif /* CONFIG_SMBFS_DEBUG2 */
> }
>
> #ifdef CONFIG_PROC_FS
> @@ -176,7 +176,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> seq_puts(m, "# Version:1\n");
> seq_puts(m, "# Format:\n");
> seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>");
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> seq_printf(m, " <filename> <mid>\n");
> #else
> seq_printf(m, " <filename>\n");
> @@ -196,7 +196,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
> cfile->pid,
> from_kuid(&init_user_ns, cfile->uid),
> cfile->dentry);
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> seq_printf(m, " %llu\n", cfile->fid.mid);
> #else
> seq_printf(m, "\n");
> @@ -225,39 +225,39 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
> "---------------------------------------------------\n");
> seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
> seq_printf(m, "Features:");
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> seq_printf(m, " DFS");
> #endif
> -#ifdef CONFIG_CIFS_FSCACHE
> +#ifdef CONFIG_SMBFS_FSCACHE
> seq_printf(m, ",FSCACHE");
> #endif
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> seq_printf(m, ",SMB_DIRECT");
> #endif
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> seq_printf(m, ",STATS2");
> #else
> seq_printf(m, ",STATS");
> #endif
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> seq_printf(m, ",DEBUG2");
> -#elif defined(CONFIG_CIFS_DEBUG)
> +#elif defined(CONFIG_SMBFS_DEBUG)
> seq_printf(m, ",DEBUG");
> #endif
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> seq_printf(m, ",ALLOW_INSECURE_LEGACY");
> #endif
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> seq_printf(m, ",CIFS_POSIX");
> #endif
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> seq_printf(m, ",UPCALL(SPNEGO)");
> #endif
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> seq_printf(m, ",XATTR");
> #endif
> seq_printf(m, ",ACL");
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> seq_puts(m, ",WITNESS");
> #endif
> seq_putc(m, '\n');
> @@ -279,7 +279,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>
> if (server->hostname)
> seq_printf(m, "Hostname: %s ", server->hostname);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (!server->rdma)
> goto skip_rdma;
>
> @@ -498,12 +498,12 @@ static ssize_t cifs_stats_proc_write(struct file *file,
>
> rc = kstrtobool_from_user(buffer, count, &bv);
> if (rc == 0) {
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> int i;
>
> atomic_set(&total_buf_alloc_count, 0);
> atomic_set(&total_small_buf_alloc_count, 0);
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
> atomic_set(&tcpSesReconnectCount, 0);
> atomic_set(&tconInfoReconnectCount, 0);
>
> @@ -514,7 +514,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> spin_lock(&cifs_tcp_ses_lock);
> list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> server->max_in_flight = 0;
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
> atomic_set(&server->num_cmds[i], 0);
> atomic_set(&server->smb2slowcmd[i], 0);
> @@ -522,7 +522,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> server->slowest_cmd[i] = 0;
> server->fastest_cmd[0] = 0;
> }
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
> list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
> list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
> atomic_set(&tcon->num_smbs_sent, 0);
> @@ -546,7 +546,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
> static int cifs_stats_proc_show(struct seq_file *m, void *v)
> {
> int i;
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> int j;
> #endif /* STATS2 */
> struct TCP_Server_Info *server;
> @@ -562,11 +562,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> cifs_min_rcv + tcpSesAllocCount.counter);
> seq_printf(m, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
> small_buf_alloc_count.counter, cifs_min_small);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> seq_printf(m, "Total Large %d Small %d Allocations\n",
> atomic_read(&total_buf_alloc_count),
> atomic_read(&total_small_buf_alloc_count));
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
>
> seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&mid_count));
> seq_printf(m,
> @@ -581,7 +581,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
> spin_lock(&cifs_tcp_ses_lock);
> list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> seq_printf(m, "\nMax requests in flight: %d", server->max_in_flight);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> seq_puts(m, "\nTotal time spent processing by command. Time ");
> seq_printf(m, "units are jiffies (%d per second)\n", HZ);
> seq_puts(m, " SMB3 CMD\tNumber\tTotal Time\tFastest\tSlowest\n");
> @@ -630,7 +630,7 @@ static const struct proc_ops cifs_stats_proc_ops = {
> .proc_write = cifs_stats_proc_write,
> };
>
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> #define PROC_FILE_DEFINE(name) \
> static ssize_t name##_write(struct file *file, const char __user *buffer, \
> size_t count, loff_t *ppos) \
> @@ -702,11 +702,11 @@ cifs_proc_init(void)
>
> proc_create("mount_params", 0444, proc_fs_cifs, &cifs_mount_params_proc_ops);
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops);
> #endif
>
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> proc_create("rdma_readwrite_threshold", 0644, proc_fs_cifs,
> &cifs_rdma_readwrite_threshold_proc_fops);
> proc_create("smbd_max_frmr_depth", 0644, proc_fs_cifs,
> @@ -742,10 +742,10 @@ cifs_proc_clean(void)
> remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
> remove_proc_entry("mount_params", proc_fs_cifs);
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> remove_proc_entry("dfscache", proc_fs_cifs);
> #endif
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> remove_proc_entry("rdma_readwrite_threshold", proc_fs_cifs);
> remove_proc_entry("smbd_max_frmr_depth", proc_fs_cifs);
> remove_proc_entry("smbd_keep_alive_interval", proc_fs_cifs);
> @@ -972,7 +972,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
>
> cifs_security_flags_handle_must_flags(&flags);
>
> - /* flags look ok - update the global security flags for cifs module */
> + /* flags look ok - update global security flags */
> global_secflags = flags;
> if (global_secflags & CIFSSEC_MUST_SIGN) {
> /* requiring signing implies signing is allowed */
> diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
> index ee4ea2b60c0f..fd6d563b0e81 100644
> --- a/fs/cifs/cifs_debug.h
> +++ b/fs/cifs/cifs_debug.h
> @@ -26,7 +26,7 @@ void dump_smb(void *, int);
> #define VFS 1
> #define FYI 2
> extern int cifsFYI;
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> #define NOISY 4
> #else
> #define NOISY 0
> @@ -37,7 +37,7 @@ extern int cifsFYI;
> * debug ON
> * --------
> */
> -#ifdef CONFIG_CIFS_DEBUG
> +#ifdef CONFIG_SMBFS_DEBUG
>
>
> /*
> diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
> index b0864da9ef43..c58e67bf62f0 100644
> --- a/fs/cifs/cifs_dfs_ref.c
> +++ b/fs/cifs/cifs_dfs_ref.c
> @@ -18,7 +18,7 @@
> #include <linux/inet.h>
> #include "cifsglob.h"
> #include "cifsproto.h"
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "dns_resolve.h"
> #include "cifs_debug.h"
> #include "cifs_unicode.h"
> diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
> index 342717bf1dc2..fd49a1490daf 100644
> --- a/fs/cifs/cifs_spnego.c
> +++ b/fs/cifs/cifs_spnego.c
> @@ -161,13 +161,13 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
> spnego_key = request_key(&cifs_spnego_key_type, description, "");
> revert_creds(saved_cred);
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> if (cifsFYI && !IS_ERR(spnego_key)) {
> struct cifs_spnego_msg *msg = spnego_key->payload.data[0];
> cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024U,
> msg->secblob_len + msg->sesskey_len));
> }
> -#endif /* CONFIG_CIFS_DEBUG2 */
> +#endif /* CONFIG_SMBFS_DEBUG2 */
>
> out:
> kfree(description);
> diff --git a/fs/cifs/cifs_swn.h b/fs/cifs/cifs_swn.h
> index 8a9d2a5c9077..1b9da6281131 100644
> --- a/fs/cifs/cifs_swn.h
> +++ b/fs/cifs/cifs_swn.h
> @@ -13,7 +13,7 @@ struct cifs_tcon;
> struct sk_buff;
> struct genl_info;
>
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> extern int cifs_swn_register(struct cifs_tcon *tcon);
>
> extern int cifs_swn_unregister(struct cifs_tcon *tcon);
> @@ -48,5 +48,5 @@ static inline void cifs_swn_check(void) {}
> static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
> static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
>
> -#endif /* CONFIG_CIFS_SWN_UPCALL */
> +#endif /* CONFIG_SMBFS_SWN_UPCALL */
> #endif /* _CIFS_SWN_H */
> diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
> index bf861fef2f0c..67e06386cfff 100644
> --- a/fs/cifs/cifsacl.c
> +++ b/fs/cifs/cifsacl.c
> @@ -717,7 +717,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
> }
>
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
> {
> int num_subauth;
> @@ -803,7 +803,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
>
> for (i = 0; i < num_aces; ++i) {
> ppace[i] = (struct cifs_ace *) (acl_base + acl_size);
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> dump_ace(ppace[i], end_of_acl);
> #endif
> if (mode_from_special_sid &&
> @@ -1162,7 +1162,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
> return -EINVAL;
> }
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> if (psid->num_subauth) {
> int i;
> cifs_dbg(FYI, "SID revision %d num_auth %d\n",
> diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
> index 3070407cafa7..58db1157d53c 100644
> --- a/fs/cifs/cifsglob.h
> +++ b/fs/cifs/cifsglob.h
> @@ -691,7 +691,7 @@ struct TCP_Server_Info {
> unsigned int total_read; /* total amount of data read in this pass */
> atomic_t in_send; /* requests trying to send */
> atomic_t num_waiters; /* blocked waiting to get in sendrecv */
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
> atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
> __u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
> @@ -728,11 +728,11 @@ struct TCP_Server_Info {
> #define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server)
> struct TCP_Server_Info *primary_server;
>
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> bool use_swn_dstaddr;
> struct sockaddr_storage swn_dstaddr;
> #endif
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> bool is_dfs_conn; /* if a dfs connection */
> struct mutex refpath_lock; /* protects leaf_fullpath */
> /*
> @@ -1252,14 +1252,14 @@ struct cifs_tcon {
> __u32 max_chunks;
> __u32 max_bytes_chunk;
> __u32 max_bytes_copy;
> -#ifdef CONFIG_CIFS_FSCACHE
> +#ifdef CONFIG_SMBFS_FSCACHE
> u64 resource_id; /* server resource id */
> struct fscache_volume *fscache; /* cookie for share */
> #endif
> struct list_head pending_opens; /* list of incomplete opens */
> struct cached_fid crfid; /* Cached root fid */
> /* BB add field for back pointer to sb struct(s)? */
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> struct list_head ulist; /* cache update list */
> #endif
> struct delayed_work query_interfaces; /* query interfaces workqueue job */
> @@ -1384,7 +1384,7 @@ struct cifs_fid {
> __u32 access;
> struct cifs_pending_open *pending_open;
> unsigned int epoch;
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> __u64 mid;
> #endif /* CIFS_DEBUG2 */
> bool purge_cache;
> @@ -1481,7 +1481,7 @@ struct cifs_readdata {
> struct iov_iter *iter);
> struct kvec iov[2];
> struct TCP_Server_Info *server;
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> struct smbd_mr *mr;
> #endif
> unsigned int pagesz;
> @@ -1506,7 +1506,7 @@ struct cifs_writedata {
> unsigned int bytes;
> int result;
> struct TCP_Server_Info *server;
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> struct smbd_mr *mr;
> #endif
> unsigned int pagesz;
> @@ -1689,7 +1689,7 @@ struct mid_q_entry {
> __u32 pid; /* process id */
> __u32 sequence_number; /* for CIFS signing */
> unsigned long when_alloc; /* when mid was created */
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> unsigned long when_sent; /* time when smb send finished */
> unsigned long when_received; /* when demux complete (taken off wire) */
> #endif
> @@ -1740,7 +1740,7 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
> atomic_dec(&server->num_waiters);
> }
>
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> static inline void cifs_save_when_sent(struct mid_q_entry *mid)
> {
> mid->when_sent = jiffies;
> @@ -1878,7 +1878,7 @@ result of setting MUST flags more than once will be to
> require use of the stronger protocol */
> #define CIFSSEC_MUST_NTLMV2 0x04004
> #define CIFSSEC_MUST_KRB5 0x08008
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> #define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
> #else
> #define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
> @@ -2023,7 +2023,7 @@ extern atomic_t tconInfoReconnectCount;
> /* Various Debug counters */
> extern atomic_t buf_alloc_count; /* current number allocated */
> extern atomic_t small_buf_alloc_count;
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> extern atomic_t total_buf_alloc_count; /* total allocated over all time */
> extern atomic_t total_small_buf_alloc_count;
> extern unsigned int slow_rsp_threshold; /* number of secs before logging */
> @@ -2063,7 +2063,7 @@ extern mempool_t *cifs_mid_poolp;
> /* Operations for different SMB versions */
> #define SMB1_VERSION_STRING "1.0"
> #define SMB20_VERSION_STRING "2.0"
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> extern struct smb_version_operations smb1_operations;
> extern struct smb_version_values smb1_values;
> extern struct smb_version_operations smb20_operations;
> diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
> index aeba371c4c70..0c24fcbb6622 100644
> --- a/fs/cifs/cifspdu.h
> +++ b/fs/cifs/cifspdu.h
> @@ -2152,7 +2152,7 @@ typedef struct {
> #define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
> #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
> QFS PROXY call */
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
> LockingX instead of posix locking call on unix sess (and we do not expect
> LockingX to use different (ie Windows) semantics than posix locking on
> @@ -2162,7 +2162,7 @@ typedef struct {
> #define CIFS_UNIX_CAP_MASK 0x000003db
> #else
> #define CIFS_UNIX_CAP_MASK 0x00000013
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
>
>
> #define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
> @@ -2607,7 +2607,7 @@ struct data_blob {
> } __attribute__((packed));
>
>
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> /*
> For better POSIX semantics from Linux client, (even better
> than the existing CIFS Unix Extensions) we need updated PDUs for:
> diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
> index d59aebefa71c..fd225e5d2456 100644
> --- a/fs/cifs/cifsproto.h
> +++ b/fs/cifs/cifsproto.h
> @@ -9,7 +9,7 @@
> #define _CIFSPROTO_H
> #include <linux/nls.h>
> #include "trace.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
>
> @@ -284,11 +284,11 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
> int from_reconnect);
> extern void cifs_put_tcon(struct cifs_tcon *tcon);
>
> -#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
> +#if IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL)
> extern void cifs_dfs_release_automount_timer(void);
> -#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> +#else /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
> #define cifs_dfs_release_automount_timer() do { } while (0)
> -#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
> +#endif /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
>
> void cifs_proc_init(void);
> void cifs_proc_clean(void);
> @@ -656,7 +656,7 @@ int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix);
> char *extract_hostname(const char *unc);
> char *extract_sharename(const char *unc);
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
> const char *old_path,
> const struct nls_table *nls_codepage,
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 04a4c304d004..3177fc3a2321 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -32,11 +32,11 @@
> #include "smb2proto.h"
> #include "fscache.h"
> #include "smbdirect.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
>
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> static struct {
> int index;
> char *name;
> @@ -56,7 +56,7 @@ static struct {
> #endif
>
> /* define the number of elements in the cifs dialect array */
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> #define CIFS_NUM_PROT 2
> #else /* not posix */
> #define CIFS_NUM_PROT 1
> @@ -1528,7 +1528,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
> }
>
> /* how much data is in the response? */
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> use_rdma_mr = rdata->mr;
> #endif
> data_len = server->ops->read_data_length(buf, use_rdma_mr);
> @@ -1914,7 +1914,7 @@ cifs_writedata_release(struct kref *refcount)
> {
> struct cifs_writedata *wdata = container_of(refcount,
> struct cifs_writedata, refcount);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (wdata->mr) {
> smbd_deregister_mr(wdata->mr);
> wdata->mr = NULL;
> @@ -3360,7 +3360,7 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
> }
>
>
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
>
> /*Convert an Access Control Entry from wire format to local POSIX xattr format*/
> static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
> @@ -6054,7 +6054,7 @@ CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> /*
> * Do a path-based QUERY_ALL_EAS call and parse the result. This is a common
> * function used by listxattr and getxattr type calls. When ea_name is set,
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 1362210f3ece..90d0254e2735 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -45,7 +45,7 @@
> #include "smb2proto.h"
> #include "smbdirect.h"
> #include "dns_resolve.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
> #include "fs_context.h"
> @@ -68,7 +68,7 @@ struct mount_ctx {
> struct TCP_Server_Info *server;
> struct cifs_ses *ses;
> struct cifs_tcon *tcon;
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> struct cifs_ses *root_ses;
> uuid_t mount_id;
> char *origin_fullpath, *leaf_fullpath;
> @@ -429,7 +429,7 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> static int __reconnect_target_unlocked(struct TCP_Server_Info *server, const char *target)
> {
> int rc;
> @@ -841,7 +841,7 @@ is_smb_response(struct TCP_Server_Info *server, unsigned char type)
> void
> dequeue_mid(struct mid_q_entry *mid, bool malformed)
> {
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> mid->when_received = jiffies;
> #endif
> spin_lock(&mid->server->mid_lock);
> @@ -983,7 +983,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
> */
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> kfree(server->origin_fullpath);
> kfree(server->leaf_fullpath);
> #endif
> @@ -1238,7 +1238,7 @@ cifs_demultiplex_thread(void *p)
> cifs_dump_mem("Received Data is: ", bufs[i],
> HEADER_SIZE(server));
> smb2_add_credits_from_hdr(bufs[i], server);
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> if (server->ops->dump_detail)
> server->ops->dump_detail(bufs[i],
> server);
> @@ -1467,7 +1467,7 @@ cifs_find_tcp_session(struct smb3_fs_context *ctx)
> spin_lock(&cifs_tcp_ses_lock);
> list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
> spin_lock(&server->srv_lock);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> /*
> * DFS failover implementation in cifs_reconnect() requires unique tcp sessions for
> * DFS connections to do failover properly, so avoid sharing them with regular
> @@ -1621,7 +1621,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> INIT_DELAYED_WORK(&tcp_ses->resolve, cifs_resolve_server);
> INIT_DELAYED_WORK(&tcp_ses->reconnect, smb2_reconnect_server);
> mutex_init(&tcp_ses->reconnect_mutex);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> mutex_init(&tcp_ses->refpath_lock);
> #endif
> memcpy(&tcp_ses->srcaddr, &ctx->srcaddr,
> @@ -1647,8 +1647,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
> else
> tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
> if (tcp_ses->rdma) {
> -#ifndef CONFIG_CIFS_SMB_DIRECT
> - cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
> +#ifndef CONFIG_SMBFS_SMB_DIRECT
> + cifs_dbg(VFS, "CONFIG_SMBFS_SMB_DIRECT is not enabled\n");
> rc = -ENOENT;
> goto out_err_crypto_release;
> #endif
> @@ -2496,7 +2496,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
> }
>
> tcon->use_witness = false;
> - if (IS_ENABLED(CONFIG_CIFS_SWN_UPCALL) && ctx->witness) {
> + if (IS_ENABLED(CONFIG_SMBFS_SWN_UPCALL) && ctx->witness) {
> if (ses->server->vals->protocol_id >= SMB30_PROT_ID) {
> if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) {
> /*
> @@ -3052,7 +3052,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
> }
>
> cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap);
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> if (cap & CIFS_UNIX_FCNTL_CAP)
> cifs_dbg(FYI, "FCNTL cap\n");
> if (cap & CIFS_UNIX_EXTATTR_CAP)
> @@ -3285,7 +3285,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
> return 0;
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> /* Get unique dfs connections */
> static int mount_get_dfs_conns(struct mount_ctx *mnt_ctx)
> {
> @@ -3486,7 +3486,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> struct cifs_tcon *tcon = mnt_ctx->tcon;
> struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
> char *full_path;
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
> #endif
>
> @@ -3505,7 +3505,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
>
> rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
> full_path);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> if (nodfs) {
> if (rc == -EREMOTE)
> rc = -EOPNOTSUPP;
> @@ -3536,7 +3536,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> static void set_root_ses(struct mount_ctx *mnt_ctx)
> {
> if (mnt_ctx->ses) {
> @@ -3996,7 +3996,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
> spin_unlock(&cifs_sb->tlink_tree_lock);
>
> kfree(cifs_sb->prepath);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id);
> #endif
> call_rcu(&cifs_sb->rcu, delayed_free);
> @@ -4383,7 +4383,7 @@ cifs_prune_tlinks(struct work_struct *work)
> TLINK_IDLE_EXPIRE);
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> /* Update dfs referral path of superblock */
> static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
> const char *target)
> diff --git a/fs/cifs/cifsfs.c b/fs/cifs/core.c
> similarity index 98%
> rename from fs/cifs/cifsfs.c
> rename to fs/cifs/core.c
> index af4c5632490e..8b135c1cd5ae 100644
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/core.c
> @@ -4,7 +4,7 @@
> * Copyright (C) International Business Machines Corp., 2002,2008
> * Author(s): Steve French ([email protected])
> *
> - * Common Internet FileSystem (CIFS) client
> + * SMBFS client
> *
> */
>
> @@ -28,7 +28,7 @@
> #include <linux/xattr.h>
> #include <uapi/linux/magic.h>
> #include <net/ipv6.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #define DECLARE_GLOBALS_HERE
> #include "cifsglob.h"
> @@ -39,10 +39,10 @@
> #include <linux/key-type.h>
> #include "cifs_spnego.h"
> #include "fscache.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> #include "netlink.h"
> #endif
> #include "fs_context.h"
> @@ -90,7 +90,7 @@ atomic_t tconInfoReconnectCount;
> atomic_t mid_count;
> atomic_t buf_alloc_count;
> atomic_t small_buf_alloc_count;
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> atomic_t total_buf_alloc_count;
> atomic_t total_small_buf_alloc_count;
> #endif/* STATS2 */
> @@ -115,7 +115,7 @@ module_param(cifs_max_pending, uint, 0444);
> MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server for "
> "CIFS/SMB1 dialect (N/A for SMB3) "
> "Default: 32767 Range: 2 to 32767.");
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> unsigned int slow_rsp_threshold = 1;
> module_param(slow_rsp_threshold, uint, 0644);
> MODULE_PARM_DESC(slow_rsp_threshold, "Amount of time (in seconds) to wait "
> @@ -266,12 +266,12 @@ cifs_read_super(struct super_block *sb)
> goto out_no_root;
> }
>
> -#ifdef CONFIG_CIFS_NFSD_EXPORT
> +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
> cifs_dbg(FYI, "export ops supported\n");
> sb->s_export_op = &cifs_export_ops;
> }
> -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>
> return 0;
>
> @@ -759,7 +759,7 @@ static void cifs_umount_begin(struct super_block *sb)
> return;
> }
>
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> static int cifs_show_stats(struct seq_file *s, struct dentry *root)
> {
> /* BB FIXME */
> @@ -797,7 +797,7 @@ static const struct super_operations cifs_super_ops = {
> as opens */
> .show_options = cifs_show_options,
> .umount_begin = cifs_umount_begin,
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> .show_stats = cifs_show_stats,
> #endif
> };
> @@ -1116,6 +1116,7 @@ struct file_system_type cifs_fs_type = {
> .fs_flags = FS_RENAME_DOES_D_MOVE,
> };
> MODULE_ALIAS_FS("cifs");
> +MODULE_ALIAS("cifs");
>
> struct file_system_type smb3_fs_type = {
> .owner = THIS_MODULE,
> @@ -1612,7 +1613,7 @@ init_cifs(void)
>
> atomic_set(&buf_alloc_count, 0);
> atomic_set(&small_buf_alloc_count, 0);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> atomic_set(&total_buf_alloc_count, 0);
> atomic_set(&total_small_buf_alloc_count, 0);
> if (slow_rsp_threshold < 1)
> @@ -1620,7 +1621,7 @@ init_cifs(void)
> else if (slow_rsp_threshold > 32767)
> cifs_dbg(VFS,
> "slow response threshold set higher than recommended (0 to 32767)\n");
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
>
> atomic_set(&mid_count, 0);
> GlobalCurrentXid = 0;
> @@ -1693,21 +1694,21 @@ init_cifs(void)
> if (rc)
> goto out_destroy_mids;
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> rc = dfs_cache_init();
> if (rc)
> goto out_destroy_request_bufs;
> -#endif /* CONFIG_CIFS_DFS_UPCALL */
> -#ifdef CONFIG_CIFS_UPCALL
> +#endif /* CONFIG_SMBFS_DFS_UPCALL */
> +#ifdef CONFIG_SMBFS_UPCALL
> rc = init_cifs_spnego();
> if (rc)
> goto out_destroy_dfs_cache;
> -#endif /* CONFIG_CIFS_UPCALL */
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#endif /* CONFIG_SMBFS_UPCALL */
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> rc = cifs_genl_init();
> if (rc)
> goto out_register_key_type;
> -#endif /* CONFIG_CIFS_SWN_UPCALL */
> +#endif /* CONFIG_SMBFS_SWN_UPCALL */
>
> rc = init_cifs_idmap();
> if (rc)
> @@ -1728,15 +1729,15 @@ init_cifs(void)
> out_init_cifs_idmap:
> exit_cifs_idmap();
> out_cifs_swn_init:
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> cifs_genl_exit();
> out_register_key_type:
> #endif
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> exit_cifs_spnego();
> out_destroy_dfs_cache:
> #endif
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> dfs_cache_destroy();
> out_destroy_request_bufs:
> #endif
> @@ -1768,13 +1769,13 @@ exit_cifs(void)
> unregister_filesystem(&smb3_fs_type);
> cifs_dfs_release_automount_timer();
> exit_cifs_idmap();
> -#ifdef CONFIG_CIFS_SWN_UPCALL
> +#ifdef CONFIG_SMBFS_SWN_UPCALL
> cifs_genl_exit();
> #endif
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> exit_cifs_spnego();
> #endif
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> dfs_cache_destroy();
> #endif
> cifs_destroy_request_bufs();
> diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
> index a9b6c3eba6de..f0d2d2c49f9e 100644
> --- a/fs/cifs/dfs_cache.c
> +++ b/fs/cifs/dfs_cache.c
> @@ -334,7 +334,7 @@ const struct proc_ops dfscache_proc_ops = {
> .proc_write = dfscache_proc_write,
> };
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> static inline void dump_tgts(const struct cache_entry *ce)
> {
> struct cache_dfs_tgt *t;
> diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
> index ce9b22aecfba..5b3728631552 100644
> --- a/fs/cifs/dir.c
> +++ b/fs/cifs/dir.c
> @@ -13,7 +13,7 @@
> #include <linux/namei.h>
> #include <linux/mount.h>
> #include <linux/file.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> diff --git a/fs/cifs/export.c b/fs/cifs/export.c
> index 37c28415df1e..0395ef73b06d 100644
> --- a/fs/cifs/export.c
> +++ b/fs/cifs/export.c
> @@ -4,8 +4,6 @@
> * Copyright (C) International Business Machines Corp., 2007
> * Author(s): Steve French ([email protected])
> *
> - * Common Internet FileSystem (CIFS) client
> - *
> * Operations related to support for exporting files via NFSD
> *
> */
> @@ -30,9 +28,9 @@
> #include <linux/exportfs.h>
> #include "cifsglob.h"
> #include "cifs_debug.h"
> -#include "cifsfs.h"
> +#include "smbfs.h"
>
> -#ifdef CONFIG_CIFS_NFSD_EXPORT
> +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> static struct dentry *cifs_get_parent(struct dentry *dentry)
> {
> /* BB need to add code here eventually to enable export via NFSD */
> @@ -50,5 +48,5 @@ const struct export_operations cifs_export_ops = {
> .encode_fs = */
> };
>
> -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>
> diff --git a/fs/cifs/file.c b/fs/cifs/file.c
> index a592fdf04313..90567ae51fa7 100644
> --- a/fs/cifs/file.c
> +++ b/fs/cifs/file.c
> @@ -22,7 +22,7 @@
> #include <linux/swap.h>
> #include <linux/mm.h>
> #include <asm/div64.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> @@ -2942,7 +2942,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
> if (wdata->cfile->invalidHandle)
> rc = -EAGAIN;
> else {
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (wdata->mr) {
> wdata->mr->need_invalidate = true;
> smbd_deregister_mr(wdata->mr);
> @@ -3455,7 +3455,7 @@ cifs_readdata_release(struct kref *refcount)
> {
> struct cifs_readdata *rdata = container_of(refcount,
> struct cifs_readdata, refcount);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (rdata->mr) {
> smbd_deregister_mr(rdata->mr);
> rdata->mr = NULL;
> @@ -3599,7 +3599,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
> if (iter)
> result = copy_page_from_iter(
> page, page_offset, n, iter);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> else if (rdata->mr)
> result = n;
> #endif
> @@ -3676,7 +3676,7 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
> if (rdata->cfile->invalidHandle)
> rc = -EAGAIN;
> else {
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (rdata->mr) {
> rdata->mr->need_invalidate = true;
> smbd_deregister_mr(rdata->mr);
> @@ -4212,7 +4212,7 @@ cifs_page_mkwrite(struct vm_fault *vmf)
> /* Wait for the page to be written to the cache before we allow it to
> * be modified. We then assume the entire page will need writing back.
> */
> -#ifdef CONFIG_CIFS_FSCACHE
> +#ifdef CONFIG_SMBFS_FSCACHE
> if (PageFsCache(page) &&
> wait_on_page_fscache_killable(page) < 0)
> return VM_FAULT_RETRY;
> @@ -4367,7 +4367,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
> if (iter)
> result = copy_page_from_iter(
> page, page_offset, n, iter);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> else if (rdata->mr)
> result = n;
> #endif
> @@ -4960,7 +4960,7 @@ static void cifs_swap_deactivate(struct file *file)
> * Mark a page as having been made dirty and thus needing writeback. We also
> * need to pin the cache object to write back to.
> */
> -#ifdef CONFIG_CIFS_FSCACHE
> +#ifdef CONFIG_SMBFS_FSCACHE
> static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
> {
> return fscache_dirty_folio(mapping, folio,
> diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
> index 8dc0d923ef6a..a8366986bf73 100644
> --- a/fs/cifs/fs_context.c
> +++ b/fs/cifs/fs_context.c
> @@ -13,7 +13,7 @@
> #include <linux/magic.h>
> #include <linux/security.h>
> #include <net/net_namespace.h>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
> */
> @@ -25,7 +25,7 @@
> #include <linux/mount.h>
> #include <linux/parser.h>
> #include <linux/utsname.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> @@ -339,7 +339,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
> substring_t args[MAX_OPT_ARGS];
>
> switch (match_token(value, cifs_smb_version_tokens, args)) {
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> case Smb_1:
> if (disable_legacy_dialects) {
> cifs_errorf(fc, "mount with legacy dialect disabled\n");
> @@ -825,7 +825,7 @@ static int smb3_reconfigure(struct fs_context *fc)
> smb3_cleanup_fs_context_contents(cifs_sb->ctx);
> rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
> smb3_update_mnt_flags(cifs_sb);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> if (!rc)
> rc = dfs_cache_remount_fs(cifs_sb);
> #endif
> @@ -1291,16 +1291,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> goto cifs_parse_mount_err;
> break;
> case Opt_witness:
> -#ifndef CONFIG_CIFS_SWN_UPCALL
> - cifs_errorf(fc, "Witness support needs CONFIG_CIFS_SWN_UPCALL config option\n");
> +#ifndef CONFIG_SMBFS_SWN_UPCALL
> + cifs_errorf(fc, "Witness support needs CONFIG_SMBFS_SWN_UPCALL config option\n");
> goto cifs_parse_mount_err;
> #endif
> ctx->witness = true;
> pr_warn_once("Witness protocol support is experimental\n");
> break;
> case Opt_rootfs:
> -#ifndef CONFIG_CIFS_ROOT
> - cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
> +#ifndef CONFIG_SMBFS_ROOT
> + cifs_dbg(VFS, "rootfs support requires CONFIG_SMBFS_ROOT config option\n");
> goto cifs_parse_mount_err;
> #endif
> ctx->rootfs = true;
> @@ -1399,8 +1399,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
> pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
> break;
> case Opt_fsc:
> -#ifndef CONFIG_CIFS_FSCACHE
> - cifs_errorf(fc, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n");
> +#ifndef CONFIG_SMBFS_FSCACHE
> + cifs_errorf(fc, "FS-Cache support needs CONFIG_SMBFS_FSCACHE kernel config option set\n");
> goto cifs_parse_mount_err;
> #endif
> ctx->fsc = true;
> diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
> index aa3b941a5555..ac2e5eb01af5 100644
> --- a/fs/cifs/fscache.h
> +++ b/fs/cifs/fscache.h
> @@ -33,7 +33,7 @@ struct cifs_fscache_inode_coherency_data {
> __le32 last_change_time_nsec;
> };
>
> -#ifdef CONFIG_CIFS_FSCACHE
> +#ifdef CONFIG_SMBFS_FSCACHE
>
> /*
> * fscache.c
> @@ -119,7 +119,7 @@ static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
> return true;
> }
>
> -#else /* CONFIG_CIFS_FSCACHE */
> +#else /* CONFIG_SMBFS_FSCACHE */
> static inline
> void cifs_fscache_fill_coherency(struct inode *inode,
> struct cifs_fscache_inode_coherency_data *cd)
> @@ -159,6 +159,6 @@ static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
> return true; /* May release page */
> }
>
> -#endif /* CONFIG_CIFS_FSCACHE */
> +#endif /* CONFIG_SMBFS_FSCACHE */
>
> #endif /* _CIFS_FSCACHE_H */
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 3ad303dd5e5a..9da2c5644960 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -14,7 +14,7 @@
> #include <linux/wait_bit.h>
> #include <linux/fiemap.h>
> #include <asm/div64.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> @@ -57,7 +57,7 @@ static void cifs_set_ops(struct inode *inode)
> inode->i_data.a_ops = &cifs_addr_ops;
> break;
> case S_IFDIR:
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> if (IS_AUTOMOUNT(inode)) {
> inode->i_op = &cifs_dfs_referral_inode_operations;
> } else {
> @@ -552,7 +552,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
> static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
> struct cifs_sb_info *cifs_sb, unsigned int xid)
> {
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> ssize_t rc;
> char ea_value[4];
> __u32 mode;
> @@ -956,7 +956,7 @@ cifs_get_inode_info(struct inode **inode,
> rc = server->ops->query_path_info(xid, tcon, cifs_sb,
> full_path, tmp_data,
> &adjust_tz, &is_reparse_point);
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> if (rc == -ENOENT && is_tcon_dfs(tcon))
> rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon,
> cifs_sb,
> @@ -1833,7 +1833,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,
>
> d_instantiate(dentry, newinode);
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> cifs_dbg(FYI, "instantiated dentry %p %pd to inode %p\n",
> dentry, dentry, newinode);
>
> diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
> index 0359b604bdbc..01f70c5352fd 100644
> --- a/fs/cifs/ioctl.c
> +++ b/fs/cifs/ioctl.c
> @@ -17,7 +17,7 @@
> #include "cifsglob.h"
> #include "cifsproto.h"
> #include "cifs_debug.h"
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifs_ioctl.h"
> #include "smb2proto.h"
> #include "smb2glob.h"
> @@ -332,7 +332,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> break;
> tcon = tlink_tcon(pSMBFile->tlink);
> caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> if (CIFS_UNIX_EXTATTR_CAP & caps) {
> __u64 ExtAttrMask = 0;
> rc = CIFSGetExtAttr(xid, tcon,
> @@ -345,7 +345,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
> if (rc != EOPNOTSUPP)
> break;
> }
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
> rc = 0;
> if (CIFS_I(inode)->cifsAttrs & ATTR_COMPRESSED) {
> /* add in the compressed bit */
> diff --git a/fs/cifs/link.c b/fs/cifs/link.c
> index bbdf3281559c..640a8724ac8e 100644
> --- a/fs/cifs/link.c
> +++ b/fs/cifs/link.c
> @@ -9,7 +9,7 @@
> #include <linux/stat.h>
> #include <linux/slab.h>
> #include <linux/namei.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
> index 7a906067db04..5b03978e658c 100644
> --- a/fs/cifs/misc.c
> +++ b/fs/cifs/misc.c
> @@ -18,8 +18,8 @@
> #include "nterr.h"
> #include "cifs_unicode.h"
> #include "smb2pdu.h"
> -#include "cifsfs.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#include "smbfs.h"
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dns_resolve.h"
> #endif
> #include "fs_context.h"
> @@ -175,9 +175,9 @@ cifs_buf_get(void)
> /* for most paths, more is cleared in header_assemble */
> memset(ret_buf, 0, buf_size + 3);
> atomic_inc(&buf_alloc_count);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> atomic_inc(&total_buf_alloc_count);
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
>
> return ret_buf;
> }
> @@ -208,9 +208,9 @@ cifs_small_buf_get(void)
> /* No need to clear memory here, cleared in header assemble */
> /* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
> atomic_inc(&small_buf_alloc_count);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> atomic_inc(&total_small_buf_alloc_count);
> -#endif /* CONFIG_CIFS_STATS2 */
> +#endif /* CONFIG_SMBFS_STATS2 */
>
> return ret_buf;
> }
> @@ -1246,7 +1246,7 @@ void cifs_put_tcp_super(struct super_block *sb)
> __cifs_put_super(sb);
> }
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> int match_target_ip(struct TCP_Server_Info *server,
> const char *share, size_t share_len,
> bool *result)
> diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
> index 28caae7aed1b..8d461b29c0e2 100644
> --- a/fs/cifs/netmisc.c
> +++ b/fs/cifs/netmisc.c
> @@ -16,7 +16,7 @@
> #include <asm/div64.h>
> #include <asm/byteorder.h>
> #include <linux/inet.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
> index 55758b9ec877..d22bf9591c3c 100644
> --- a/fs/cifs/ntlmssp.h
> +++ b/fs/cifs/ntlmssp.h
> @@ -93,7 +93,7 @@ typedef struct _NEGOTIATE_MESSAGE {
> struct ntlmssp_version {
> __u8 ProductMajorVersion;
> __u8 ProductMinorVersion;
> - __le16 ProductBuild; /* we send the cifs.ko module version here */
> + __le16 ProductBuild; /* we send the module version here */
> __u8 Reserved[3];
> __u8 NTLMRevisionCurrent; /* currently 0x0F */
> } __packed;
> diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
> index 384cabdf47ca..acfe26e3ec0e 100644
> --- a/fs/cifs/readdir.c
> +++ b/fs/cifs/readdir.c
> @@ -18,7 +18,7 @@
> #include "cifs_unicode.h"
> #include "cifs_debug.h"
> #include "cifs_fs_sb.h"
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "smb2proto.h"
> #include "fs_context.h"
>
> @@ -29,7 +29,7 @@
> */
> #define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2)
>
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> static void dump_cifs_file_struct(struct file *file, char *label)
> {
> struct cifsFileInfo *cf;
> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> index 02c8b2906196..a6288850c7cc 100644
> --- a/fs/cifs/sess.c
> +++ b/fs/cifs/sess.c
> @@ -18,7 +18,7 @@
> #include <linux/utsname.h>
> #include <linux/slab.h>
> #include <linux/version.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifs_spnego.h"
> #include "smb2proto.h"
> #include "fs_context.h"
> @@ -1376,7 +1376,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data)
> ses->auth_key.response = NULL;
> }
>
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> static void
> sess_auth_kerberos(struct sess_data *sess_data)
> {
> @@ -1515,7 +1515,7 @@ sess_auth_kerberos(struct sess_data *sess_data)
> ses->auth_key.response = NULL;
> }
>
> -#endif /* ! CONFIG_CIFS_UPCALL */
> +#endif /* ! CONFIG_SMBFS_UPCALL */
>
> /*
> * The required kvec buffers have to be allocated before calling this
> @@ -1792,13 +1792,13 @@ static int select_sec(struct sess_data *sess_data)
> sess_data->func = sess_auth_ntlmv2;
> break;
> case Kerberos:
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> sess_data->func = sess_auth_kerberos;
> break;
> #else
> cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
> return -ENOSYS;
> -#endif /* CONFIG_CIFS_UPCALL */
> +#endif /* CONFIG_SMBFS_UPCALL */
> case RawNTLMSSP:
> sess_data->func = sess_auth_rawntlmssp_negotiate;
> break;
> diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
> index f36b2d2d40ca..f60b6696a1c1 100644
> --- a/fs/cifs/smb1ops.c
> +++ b/fs/cifs/smb1ops.c
> @@ -926,7 +926,7 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
> const unsigned char *searchName, char **symlinkinfo,
> const struct nls_table *nls_codepage)
> {
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> int rc;
> struct dfs_info3_param referral = {0};
>
> @@ -1226,7 +1226,7 @@ struct smb_version_operations smb1_operations = {
> .wp_retry_size = cifs_wp_retry_size,
> .dir_needs_close = cifs_dir_needs_close,
> .select_sectype = cifs_select_sectype,
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> .query_all_EAs = CIFSSMBQAllEAs,
> .set_EA = CIFSSMBSetEA,
> #endif /* CIFS_XATTR */
> diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
> index f5dcc4940b6d..82887064569a 100644
> --- a/fs/cifs/smb2file.c
> +++ b/fs/cifs/smb2file.c
> @@ -11,7 +11,7 @@
> #include <linux/slab.h>
> #include <linux/pagemap.h>
> #include <asm/div64.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
> index 8571a459c710..66b2d03ea231 100644
> --- a/fs/cifs/smb2inode.c
> +++ b/fs/cifs/smb2inode.c
> @@ -12,7 +12,7 @@
> #include <linux/slab.h>
> #include <linux/pagemap.h>
> #include <asm/div64.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 82dd2e973753..012b8b8a96ba 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -14,7 +14,7 @@
> #include <crypto/aead.h>
> #include <linux/fiemap.h>
> #include <uapi/linux/magic.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifsglob.h"
> #include "smb2pdu.h"
> #include "smb2proto.h"
> @@ -379,7 +379,7 @@ smb2_find_dequeue_mid(struct TCP_Server_Info *server, char *buf)
> static void
> smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
> {
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
>
> cifs_server_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n",
> @@ -437,7 +437,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> /* start with specified wsize, or default */
> wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
> wsize = min_t(unsigned int, wsize, server->max_write);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (server->rdma) {
> if (server->sign)
> /*
> @@ -485,7 +485,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
> /* start with specified rsize, or default */
> rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
> rsize = min_t(unsigned int, rsize, server->max_read);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (server->rdma) {
> if (server->sign)
> /*
> @@ -930,7 +930,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
> o_rsp = (struct smb2_create_rsp *)rsp_iov[0].iov_base;
> oparms.fid->persistent_fid = o_rsp->PersistentFileId;
> oparms.fid->volatile_fid = o_rsp->VolatileFileId;
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> oparms.fid->mid = le64_to_cpu(o_rsp->hdr.MessageId);
> #endif /* CIFS_DEBUG2 */
>
> @@ -1132,7 +1132,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> static ssize_t
> move_smb2_ea_to_cifs(char *dst, size_t dst_size,
> struct smb2_file_full_ea_info *src, size_t src_size,
> @@ -1544,7 +1544,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
> cfile->fid.persistent_fid = fid->persistent_fid;
> cfile->fid.volatile_fid = fid->volatile_fid;
> cfile->fid.access = fid->access;
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> cfile->fid.mid = fid->mid;
> #endif /* CIFS_DEBUG2 */
> server->ops->set_oplock_level(cinode, oplock, fid->epoch,
> @@ -4352,7 +4352,7 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
> }
> }
>
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> static bool
> smb2_is_read_op(__u32 oplock)
> {
> @@ -4941,7 +4941,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid,
> }
>
> data_offset = server->ops->read_data_offset(buf);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> use_rdma_mr = rdata->mr;
> #endif
> data_len = server->ops->read_data_length(buf, use_rdma_mr);
> @@ -5073,7 +5073,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
> dw->ppages, dw->npages, dw->len,
> true);
> if (rc >= 0) {
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> mid->when_received = jiffies;
> #endif
> if (dw->server->ops->is_network_name_deleted)
> @@ -5460,7 +5460,7 @@ smb2_make_node(unsigned int xid, struct inode *inode,
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> struct smb_version_operations smb20_operations = {
> .compare_fids = smb2_compare_fids,
> .setup_request = smb2_setup_request,
> @@ -5544,7 +5544,7 @@ struct smb_version_operations smb20_operations = {
> .dir_needs_close = smb2_dir_needs_close,
> .get_dfs_refer = smb2_get_dfs_refer,
> .select_sectype = smb2_select_sectype,
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> .query_all_EAs = smb2_query_eas,
> .set_EA = smb2_set_ea,
> #endif /* CIFS_XATTR */
> @@ -5647,7 +5647,7 @@ struct smb_version_operations smb21_operations = {
> .notify = smb3_notify,
> .get_dfs_refer = smb2_get_dfs_refer,
> .select_sectype = smb2_select_sectype,
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> .query_all_EAs = smb2_query_eas,
> .set_EA = smb2_set_ea,
> #endif /* CIFS_XATTR */
> @@ -5761,7 +5761,7 @@ struct smb_version_operations smb30_operations = {
> .receive_transform = smb3_receive_transform,
> .get_dfs_refer = smb2_get_dfs_refer,
> .select_sectype = smb2_select_sectype,
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> .query_all_EAs = smb2_query_eas,
> .set_EA = smb2_set_ea,
> #endif /* CIFS_XATTR */
> @@ -5875,7 +5875,7 @@ struct smb_version_operations smb311_operations = {
> .receive_transform = smb3_receive_transform,
> .get_dfs_refer = smb2_get_dfs_refer,
> .select_sectype = smb2_select_sectype,
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> .query_all_EAs = smb2_query_eas,
> .set_EA = smb2_set_ea,
> #endif /* CIFS_XATTR */
> @@ -5891,7 +5891,7 @@ struct smb_version_operations smb311_operations = {
> .is_network_name_deleted = smb2_is_network_name_deleted,
> };
>
> -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
> +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
> struct smb_version_values smb20_values = {
> .version_string = SMB20_VERSION_STRING,
> .protocol_id = SMB20_PROT_ID,
> diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
> index 131bec79d6fd..86decb4642aa 100644
> --- a/fs/cifs/smb2pdu.c
> +++ b/fs/cifs/smb2pdu.c
> @@ -36,7 +36,7 @@
> #include "cifs_spnego.h"
> #include "smbdirect.h"
> #include "trace.h"
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> #include "dfs_cache.h"
> #endif
>
> @@ -1319,7 +1319,7 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
> else
> req->SecurityMode = 0;
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
> #else
> req->Capabilities = 0;
> @@ -1402,7 +1402,7 @@ SMB2_sess_establish_session(struct SMB2_sess_data *sess_data)
> return rc;
> }
>
> -#ifdef CONFIG_CIFS_UPCALL
> +#ifdef CONFIG_SMBFS_UPCALL
> static void
> SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
> {
> @@ -1638,7 +1638,7 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
> }
>
> rc = SMB2_sess_establish_session(sess_data);
> -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> if (ses->server->dialect < SMB30_PROT_ID) {
> cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
> /*
> @@ -3026,7 +3026,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
> oparms->fid->persistent_fid = rsp->PersistentFileId;
> oparms->fid->volatile_fid = rsp->VolatileFileId;
> oparms->fid->access = oparms->desired_access;
> -#ifdef CONFIG_CIFS_DEBUG2
> +#ifdef CONFIG_SMBFS_DEBUG2
> oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
> #endif /* CIFS_DEBUG2 */
>
> @@ -4057,7 +4057,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
> io_parms->persistent_fid,
> io_parms->tcon->tid, io_parms->tcon->ses->Suid,
> io_parms->offset, io_parms->length);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> /*
> * If we want to do a RDMA write, fill in and append
> * smbd_buffer_descriptor_v1 to the end of read request
> @@ -4177,7 +4177,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
> default:
> rdata->result = -EIO;
> }
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> /*
> * If this rdata has a memmory registered, the MR can be freed
> * MR needs to be freed as soon as I/O finishes to prevent deadlock
> @@ -4411,7 +4411,7 @@ smb2_writev_callback(struct mid_q_entry *mid)
> wdata->result = -EIO;
> break;
> }
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> /*
> * If this wdata has a memory registered, the MR can be freed
> * The number of MRs available is limited, it's important to recover
> @@ -4484,7 +4484,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
>
> trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid,
> tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes);
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> /*
> * If we want to do a server RDMA read, fill in and append
> * smbd_buffer_descriptor_v1 to the end of write request
> @@ -4536,7 +4536,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> rqst.rq_npages = wdata->nr_pages;
> rqst.rq_pagesz = wdata->pagesz;
> rqst.rq_tailsz = wdata->tailsz;
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> if (wdata->mr) {
> iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
> rqst.rq_npages = 0;
> @@ -4545,7 +4545,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
> cifs_dbg(FYI, "async write at %llu %u bytes\n",
> wdata->offset, wdata->bytes);
>
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> /* For RDMA read, I/O size is in RemainingBytes not in Length */
> if (!wdata->mr)
> req->Length = cpu_to_le32(wdata->bytes);
> diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
> index f64922f340b3..00313a488e6f 100644
> --- a/fs/cifs/smb2transport.c
> +++ b/fs/cifs/smb2transport.c
> @@ -454,7 +454,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
> if (rc)
> return rc;
>
> -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
> +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
> cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);
> /*
> * The session id is opaque in terms of endianness, so we can't
> diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
> index a87fca82a796..922344c8d5c1 100644
> --- a/fs/cifs/smbdirect.h
> +++ b/fs/cifs/smbdirect.h
> @@ -7,7 +7,7 @@
> #ifndef _SMBDIRECT_H
> #define _SMBDIRECT_H
>
> -#ifdef CONFIG_CIFS_SMB_DIRECT
> +#ifdef CONFIG_SMBFS_SMB_DIRECT
> #define cifs_rdma_enabled(server) ((server)->rdma)
>
> #include "cifsglob.h"
> diff --git a/fs/cifs/cifsfs.h b/fs/cifs/smbfs.h
> similarity index 97%
> rename from fs/cifs/cifsfs.h
> rename to fs/cifs/smbfs.h
> index 81f4c15936d0..d067be5d3184 100644
> --- a/fs/cifs/cifsfs.h
> +++ b/fs/cifs/smbfs.h
> @@ -115,7 +115,7 @@ extern int cifs_readdir(struct file *file, struct dir_context *ctx);
> extern const struct dentry_operations cifs_dentry_ops;
> extern const struct dentry_operations cifs_ci_dentry_ops;
>
> -#ifdef CONFIG_CIFS_DFS_UPCALL
> +#ifdef CONFIG_SMBFS_DFS_UPCALL
> extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
> #else
> #define cifs_dfs_d_automount NULL
> @@ -127,12 +127,12 @@ extern const char *cifs_get_link(struct dentry *, struct inode *,
> extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
> struct dentry *direntry, const char *symname);
>
> -#ifdef CONFIG_CIFS_XATTR
> +#ifdef CONFIG_SMBFS_XATTR
> extern const struct xattr_handler *cifs_xattr_handlers[];
> extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
> #else
> -# define cifs_xattr_handlers NULL
> -# define cifs_listxattr NULL
> +#define cifs_xattr_handlers NULL
> +#define cifs_listxattr NULL
> #endif
>
> extern ssize_t cifs_file_copychunk_range(unsigned int xid,
> @@ -148,9 +148,9 @@ struct smb3_fs_context;
> extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
> int flags, struct smb3_fs_context *ctx);
>
> -#ifdef CONFIG_CIFS_NFSD_EXPORT
> +#ifdef CONFIG_SMBFS_NFSD_EXPORT
> extern const struct export_operations cifs_export_ops;
> -#endif /* CONFIG_CIFS_NFSD_EXPORT */
> +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>
> /* when changing internal version - update following two lines at same time */
> #define SMB3_PRODUCT_BUILD 38
> diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
> index 160463e22c95..cd689b47d0d9 100644
> --- a/fs/cifs/transport.c
> +++ b/fs/cifs/transport.c
> @@ -77,7 +77,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> {
> struct mid_q_entry *midEntry =
> container_of(refcount, struct mid_q_entry, refcount);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> __le16 command = midEntry->server->vals->lock_cmd;
> __u16 smb_cmd = le16_to_cpu(midEntry->command);
> unsigned long now;
> @@ -96,7 +96,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
> cifs_buf_release(midEntry->resp_buf);
> else
> cifs_small_buf_release(midEntry->resp_buf);
> -#ifdef CONFIG_CIFS_STATS2
> +#ifdef CONFIG_SMBFS_STATS2
> now = jiffies;
> if (now < midEntry->when_alloc)
> cifs_server_dbg(VFS, "Invalid mid allocation time\n");
> diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
> index 9d486fbbfbbd..bce40126e1a9 100644
> --- a/fs/cifs/xattr.c
> +++ b/fs/cifs/xattr.c
> @@ -10,7 +10,7 @@
> #include <linux/posix_acl_xattr.h>
> #include <linux/slab.h>
> #include <linux/xattr.h>
> -#include "cifsfs.h"
> +#include "smbfs.h"
> #include "cifspdu.h"
> #include "cifsglob.h"
> #include "cifsproto.h"
> @@ -202,7 +202,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> }
>
> case XATTR_ACL_ACCESS:
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> if (!value)
> goto out;
> if (sb->s_flags & SB_POSIXACL)
> @@ -210,11 +210,11 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> value, (const int)size,
> ACL_TYPE_ACCESS, cifs_sb->local_nls,
> cifs_remap(cifs_sb));
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
> break;
>
> case XATTR_ACL_DEFAULT:
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> if (!value)
> goto out;
> if (sb->s_flags & SB_POSIXACL)
> @@ -222,7 +222,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
> value, (const int)size,
> ACL_TYPE_DEFAULT, cifs_sb->local_nls,
> cifs_remap(cifs_sb));
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
> break;
> }
>
> @@ -366,23 +366,23 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
> }
>
> case XATTR_ACL_ACCESS:
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> if (sb->s_flags & SB_POSIXACL)
> rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> value, size, ACL_TYPE_ACCESS,
> cifs_sb->local_nls,
> cifs_remap(cifs_sb));
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
> break;
>
> case XATTR_ACL_DEFAULT:
> -#ifdef CONFIG_CIFS_POSIX
> +#ifdef CONFIG_SMBFS_POSIX
> if (sb->s_flags & SB_POSIXACL)
> rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
> value, size, ACL_TYPE_DEFAULT,
> cifs_sb->local_nls,
> cifs_remap(cifs_sb));
> -#endif /* CONFIG_CIFS_POSIX */
> +#endif /* CONFIG_SMBFS_POSIX */
> break;
> }
>
> --
> 2.35.3
>


--
Thanks,

Steve

2023-07-27 01:21:11

by Enzo Matsumiya

[permalink] [raw]
Subject: Re: [RFC PATCH 1/3] cifs: change module name to "smbfs.ko"

On 07/26, Steve French via samba-technical wrote:
>If it is considered, I would want a much smaller version of this at
>first (that limited it to the new default module name and preserving
>the old one as module alias).
>
>On Wed, Jul 26, 2023 at 3:29 PM Steve French <[email protected]> wrote:
>>
>> This was an old patch series I found when looking for something else.
>>
>> On Wed, Jul 26, 2023 at 3:28 PM Steve French <[email protected]> wrote:
>> >
>> > I like the idea but am curious about other's opinions.

Well, I think it made sense then, so now even more so :)

I'll respin a reduced version and send RFC.


Enzo

>> > On Mon, Aug 1, 2022 at 2:09 PM Enzo Matsumiya <[email protected]> wrote:
>> > >
>> > > Rename "cifs.ko" module to "smbfs.ko", but keep "cifs" as a module alias
>> > > for compatibility with existing scripts/tools.
>> > >
>> > > TODO: update spnego and idmap key names, cifs-utils, etc, warn about
>> > > module rename
>> > > To discuss: procfs entries (/proc/fs/cifs)
>> > >
>> > > Signed-off-by: Enzo Matsumiya <[email protected]>
>> > > ---
>> > > fs/Kconfig | 4 +-
>> > > fs/Makefile | 2 +-
>> > > fs/cifs/Kconfig | 108 +++++++++++++++++-----------------
>> > > fs/cifs/Makefile | 24 ++++----
>> > > fs/cifs/cifs_debug.c | 72 +++++++++++------------
>> > > fs/cifs/cifs_debug.h | 4 +-
>> > > fs/cifs/cifs_dfs_ref.c | 2 +-
>> > > fs/cifs/cifs_spnego.c | 4 +-
>> > > fs/cifs/cifs_swn.h | 4 +-
>> > > fs/cifs/cifsacl.c | 6 +-
>> > > fs/cifs/cifsglob.h | 26 ++++----
>> > > fs/cifs/cifspdu.h | 6 +-
>> > > fs/cifs/cifsproto.h | 10 ++--
>> > > fs/cifs/cifssmb.c | 14 ++---
>> > > fs/cifs/connect.c | 36 ++++++------
>> > > fs/cifs/{cifsfs.c => core.c} | 49 +++++++--------
>> > > fs/cifs/dfs_cache.c | 2 +-
>> > > fs/cifs/dir.c | 2 +-
>> > > fs/cifs/export.c | 8 +--
>> > > fs/cifs/file.c | 16 ++---
>> > > fs/cifs/fs_context.c | 20 +++----
>> > > fs/cifs/fscache.h | 6 +-
>> > > fs/cifs/inode.c | 10 ++--
>> > > fs/cifs/ioctl.c | 6 +-
>> > > fs/cifs/link.c | 2 +-
>> > > fs/cifs/misc.c | 14 ++---
>> > > fs/cifs/netmisc.c | 2 +-
>> > > fs/cifs/ntlmssp.h | 2 +-
>> > > fs/cifs/readdir.c | 4 +-
>> > > fs/cifs/sess.c | 10 ++--
>> > > fs/cifs/smb1ops.c | 4 +-
>> > > fs/cifs/smb2file.c | 2 +-
>> > > fs/cifs/smb2inode.c | 2 +-
>> > > fs/cifs/smb2ops.c | 32 +++++-----
>> > > fs/cifs/smb2pdu.c | 22 +++----
>> > > fs/cifs/smb2transport.c | 2 +-
>> > > fs/cifs/smbdirect.h | 2 +-
>> > > fs/cifs/{cifsfs.h => smbfs.h} | 12 ++--
>> > > fs/cifs/transport.c | 4 +-
>> > > fs/cifs/xattr.c | 18 +++---
>> > > 40 files changed, 287 insertions(+), 288 deletions(-)
>> > > rename fs/cifs/{cifsfs.c => core.c} (98%)
>> > > rename fs/cifs/{cifsfs.h => smbfs.h} (97%)
>> > >
>> > > diff --git a/fs/Kconfig b/fs/Kconfig
>> > > index 5976eb33535f..860ca257c681 100644
>> > > --- a/fs/Kconfig
>> > > +++ b/fs/Kconfig
>> > > @@ -377,8 +377,8 @@ source "fs/ksmbd/Kconfig"
>> > >
>> > > config SMBFS_COMMON
>> > > tristate
>> > > - default y if CIFS=y || SMB_SERVER=y
>> > > - default m if CIFS=m || SMB_SERVER=m
>> > > + default y if SMBFS=y || SMB_SERVER=y
>> > > + default m if SMBFS=m || SMB_SERVER=m
>> > >
>> > > source "fs/coda/Kconfig"
>> > > source "fs/afs/Kconfig"
>> > > diff --git a/fs/Makefile b/fs/Makefile
>> > > index 208a74e0b00e..a07039e124ce 100644
>> > > --- a/fs/Makefile
>> > > +++ b/fs/Makefile
>> > > @@ -99,7 +99,7 @@ obj-$(CONFIG_NLS) += nls/
>> > > obj-y += unicode/
>> > > obj-$(CONFIG_SYSV_FS) += sysv/
>> > > obj-$(CONFIG_SMBFS_COMMON) += smbfs_common/
>> > > -obj-$(CONFIG_CIFS) += cifs/
>> > > +obj-$(CONFIG_SMBFS) += cifs/
>> > > obj-$(CONFIG_SMB_SERVER) += ksmbd/
>> > > obj-$(CONFIG_HPFS_FS) += hpfs/
>> > > obj-$(CONFIG_NTFS_FS) += ntfs/
>> > > diff --git a/fs/cifs/Kconfig b/fs/cifs/Kconfig
>> > > index 3b7e3b9e4fd2..c2157720ffc1 100644
>> > > --- a/fs/cifs/Kconfig
>> > > +++ b/fs/cifs/Kconfig
>> > > @@ -1,6 +1,6 @@
>> > > # SPDX-License-Identifier: GPL-2.0-only
>> > > -config CIFS
>> > > - tristate "SMB3 and CIFS support (advanced network filesystem)"
>> > > +config SMBFS
>> > > + tristate "SMBFS support (protocol versions 1, 2, and 3)"
>> > > depends on INET
>> > > select NLS
>> > > select CRYPTO
>> > > @@ -37,9 +37,9 @@ config CIFS
>> > > and similar very old servers.
>> > >
>> > > This module provides an advanced network file system client
>> > > - for mounting to SMB3 (and CIFS) compliant servers. It includes
>> > > - support for DFS (hierarchical name space), secure per-user
>> > > - session establishment via Kerberos or NTLM or NTLMv2, RDMA
>> > > + for mounting to SMB-compliant servers. It includes support for
>> > > + DFS (hierarchical name space), secure per-user session
>> > > + establishment via Kerberos or NTLM or NTLMv2, RDMA
>> > > (smbdirect), advanced security features, per-share encryption,
>> > > directory leases, safe distributed caching (oplock), optional packet
>> > > signing, Unicode and other internationalization improvements.
>> > > @@ -47,29 +47,29 @@ config CIFS
>> > > In general, the default dialects, SMB3 and later, enable better
>> > > performance, security and features, than would be possible with CIFS.
>> > > Note that when mounting to Samba, due to the CIFS POSIX extensions,
>> > > - CIFS mounts can provide slightly better POSIX compatibility
>> > > + SMBFS mounts can provide slightly better POSIX compatibility
>> > > than SMB3 mounts. SMB2/SMB3 mount options are also
>> > > slightly simpler (compared to CIFS) due to protocol improvements.
>> > >
>> > > If you need to mount to Samba, Azure, Macs or Windows from this machine, say Y.
>> > >
>> > > -config CIFS_STATS2
>> > > +config SMBFS_STATS2
>> > > bool "Extended statistics"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > default y
>> > > help
>> > > Enabling this option will allow more detailed statistics on SMB
>> > > request timing to be displayed in /proc/fs/cifs/DebugData and also
>> > > allow optional logging of slow responses to dmesg (depending on the
>> > > - value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/cifs/usage.rst
>> > > + value of /proc/fs/cifs/cifsFYI). See Documentation/admin-guide/smbfs/usage.rst
>> > > for more details. These additional statistics may have a minor effect
>> > > on performance and memory utilization.
>> > >
>> > > If unsure, say Y.
>> > >
>> > > -config CIFS_ALLOW_INSECURE_LEGACY
>> > > +config SMBFS_ALLOW_INSECURE_LEGACY
>> > > bool "Support legacy servers which use less secure dialects"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > default y
>> > > help
>> > > Modern dialects, SMB2.1 and later (including SMB3 and 3.1.1), have
>> > > @@ -78,69 +78,69 @@ config CIFS_ALLOW_INSECURE_LEGACY
>> > > of legacy dialects (SMB1/CIFS and SMB2.0) is discouraged.
>> > >
>> > > Disabling this option prevents users from using vers=1.0 or vers=2.0
>> > > - on mounts with cifs.ko
>> > > + on mounts with smbfs.ko
>> > >
>> > > If unsure, say Y.
>> > >
>> > > -config CIFS_UPCALL
>> > > +config SMBFS_UPCALL
>> > > bool "Kerberos/SPNEGO advanced session setup"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > help
>> > > - Enables an upcall mechanism for CIFS which accesses userspace helper
>> > > + Enables an upcall mechanism for SMBFS which accesses userspace helper
>> > > utilities to provide SPNEGO packaged (RFC 4178) Kerberos tickets
>> > > which are needed to mount to certain secure servers (for which more
>> > > secure Kerberos authentication is required). If unsure, say Y.
>> > >
>> > > -config CIFS_XATTR
>> > > +config SMBFS_XATTR
>> > > bool "CIFS extended attributes"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > help
>> > > Extended attributes are name:value pairs associated with inodes by
>> > > the kernel or by users (see the attr(5) manual page for details).
>> > > - CIFS maps the name of extended attributes beginning with the user
>> > > + SMBFS maps the name of extended attributes beginning with the user
>> > > namespace prefix to SMB/CIFS EAs. EAs are stored on Windows
>> > > servers without the user namespace prefix, but their names are
>> > > - seen by Linux cifs clients prefaced by the user namespace prefix.
>> > > + seen by Linux SMBFS clients prefaced by the user namespace prefix.
>> > > The system namespace (used by some filesystems to store ACLs) is
>> > > not supported at this time.
>> > >
>> > > If unsure, say Y.
>> > >
>> > > -config CIFS_POSIX
>> > > - bool "CIFS POSIX Extensions"
>> > > - depends on CIFS && CIFS_ALLOW_INSECURE_LEGACY && CIFS_XATTR
>> > > +config SMBFS_POSIX
>> > > + bool "SMBFS POSIX Extensions"
>> > > + depends on SMBFS && SMBFS_ALLOW_INSECURE_LEGACY && SMBFS_XATTR
>> > > help
>> > > - Enabling this option will cause the cifs client to attempt to
>> > > + Enabling this option will cause SMBFS to attempt to
>> > > negotiate a newer dialect with servers, such as Samba 3.0.5
>> > > or later, that optionally can handle more POSIX like (rather
>> > > than Windows like) file behavior. It also enables
>> > > support for POSIX ACLs (getfacl and setfacl) to servers
>> > > (such as Samba 3.10 and later) which can negotiate
>> > > - CIFS POSIX ACL support. If unsure, say N.
>> > > + SMBFS POSIX ACL support. If unsure, say N.
>> > >
>> > > -config CIFS_DEBUG
>> > > - bool "Enable CIFS debugging routines"
>> > > +config SMBFS_DEBUG
>> > > + bool "Enable SMBFS debugging routines"
>> > > default y
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > help
>> > > Enabling this option adds helpful debugging messages to
>> > > - the cifs code which increases the size of the cifs module.
>> > > + the SMBFS code which increases the size of the module.
>> > > If unsure, say Y.
>> > >
>> > > -config CIFS_DEBUG2
>> > > - bool "Enable additional CIFS debugging routines"
>> > > - depends on CIFS_DEBUG
>> > > +config SMBFS_DEBUG2
>> > > + bool "Enable additional SMBFS debugging routines"
>> > > + depends on SMBFS_DEBUG
>> > > help
>> > > Enabling this option adds a few more debugging routines
>> > > - to the cifs code which slightly increases the size of
>> > > - the cifs module and can cause additional logging of debug
>> > > + to the SMBFS code which slightly increases the size of
>> > > + the module and can cause additional logging of debug
>> > > messages in some error paths, slowing performance. This
>> > > option can be turned off unless you are debugging
>> > > - cifs problems. If unsure, say N.
>> > > + SMBFS problems. If unsure, say N.
>> > >
>> > > -config CIFS_DEBUG_DUMP_KEYS
>> > > +config SMBFS_DEBUG_DUMP_KEYS
>> > > bool "Dump encryption keys for offline decryption (Unsafe)"
>> > > - depends on CIFS_DEBUG
>> > > + depends on SMBFS_DEBUG
>> > > help
>> > > Enabling this will dump the encryption and decryption keys
>> > > used to communicate on an encrypted share connection on the
>> > > @@ -148,55 +148,55 @@ config CIFS_DEBUG_DUMP_KEYS
>> > > encrypted network captures. Enable this carefully.
>> > > If unsure, say N.
>> > >
>> > > -config CIFS_DFS_UPCALL
>> > > +config SMBFS_DFS_UPCALL
>> > > bool "DFS feature support"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > help
>> > > Distributed File System (DFS) support is used to access shares
>> > > transparently in an enterprise name space, even if the share
>> > > moves to a different server. This feature also enables
>> > > - an upcall mechanism for CIFS which contacts userspace helper
>> > > + an upcall mechanism for SMBFS which contacts userspace helper
>> > > utilities to provide server name resolution (host names to
>> > > IP addresses) which is needed in order to reconnect to
>> > > servers if their addresses change or for implicit mounts of
>> > > DFS junction points. If unsure, say Y.
>> > >
>> > > -config CIFS_SWN_UPCALL
>> > > +config SMBFS_SWN_UPCALL
>> > > bool "SWN feature support"
>> > > - depends on CIFS
>> > > + depends on SMBFS
>> > > help
>> > > The Service Witness Protocol (SWN) is used to get notifications
>> > > from a highly available server of resource state changes. This
>> > > - feature enables an upcall mechanism for CIFS which contacts a
>> > > + feature enables an upcall mechanism for SMBFS which contacts a
>> > > userspace daemon to establish the DCE/RPC connection to retrieve
>> > > the cluster available interfaces and resource change notifications.
>> > > If unsure, say Y.
>> > >
>> > > -config CIFS_NFSD_EXPORT
>> > > - bool "Allow nfsd to export CIFS file system"
>> > > - depends on CIFS && BROKEN
>> > > +config SMBFS_NFSD_EXPORT
>> > > + bool "Allow nfsd to export SMBFS file system"
>> > > + depends on SMBFS && BROKEN
>> > > help
>> > > - Allows NFS server to export a CIFS mounted share (nfsd over cifs)
>> > > + Allows NFS server to export a SMBFS mounted share (nfsd over SMBFS)
>> > >
>> > > -config CIFS_SMB_DIRECT
>> > > +config SMBFS_SMB_DIRECT
>> > > bool "SMB Direct support"
>> > > - depends on CIFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || CIFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
>> > > + depends on SMBFS=m && INFINIBAND && INFINIBAND_ADDR_TRANS || SMBFS=y && INFINIBAND=y && INFINIBAND_ADDR_TRANS=y
>> > > help
>> > > Enables SMB Direct support for SMB 3.0, 3.02 and 3.1.1.
>> > > SMB Direct allows transferring SMB packets over RDMA. If unsure,
>> > > say Y.
>> > >
>> > > -config CIFS_FSCACHE
>> > > - bool "Provide CIFS client caching support"
>> > > - depends on CIFS=m && FSCACHE || CIFS=y && FSCACHE=y
>> > > +config SMBFS_FSCACHE
>> > > + bool "Provide SMBFS client caching support"
>> > > + depends on SMBFS=m && FSCACHE || SMBFS=y && FSCACHE=y
>> > > help
>> > > - Makes CIFS FS-Cache capable. Say Y here if you want your CIFS data
>> > > + Makes SMBFS FS-Cache capable. Say Y here if you want your SMBFS data
>> > > to be cached locally on disk through the general filesystem cache
>> > > manager. If unsure, say N.
>> > >
>> > > -config CIFS_ROOT
>> > > +config SMBFS_ROOT
>> > > bool "SMB root file system (Experimental)"
>> > > - depends on CIFS=y && IP_PNP
>> > > + depends on SMBFS=y && IP_PNP
>> > > help
>> > > Enables root file system support over SMB protocol.
>> > >
>> > > diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
>> > > index 8c9f2c00be72..07096b742b1d 100644
>> > > --- a/fs/cifs/Makefile
>> > > +++ b/fs/cifs/Makefile
>> > > @@ -1,11 +1,11 @@
>> > > # SPDX-License-Identifier: GPL-2.0
>> > > #
>> > > -# Makefile for Linux CIFS/SMB2/SMB3 VFS client
>> > > +# Makefile for Linux SMBFS VFS client
>> > > #
>> > > -ccflags-y += -I$(src) # needed for trace events
>> > > -obj-$(CONFIG_CIFS) += cifs.o
>> > > +ccflags-y += -I$(src) # needed for trace events
>> > > +obj-$(CONFIG_SMBFS) += smbfs.o
>> > >
>> > > -cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
>> > > +smbfs-y := trace.o core.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
>> > > inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
>> > > cifs_unicode.o nterr.o cifsencrypt.o \
>> > > readdir.o ioctl.o sess.o export.o unc.o winucase.o \
>> > > @@ -17,18 +17,18 @@ $(obj)/asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.h
>> > >
>> > > $(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h
>> > >
>> > > -cifs-$(CONFIG_CIFS_XATTR) += xattr.o
>> > > +smbfs-$(CONFIG_SMBFS_XATTR) += xattr.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_UPCALL) += cifs_spnego.o
>> > > +smbfs-$(CONFIG_SMBFS_UPCALL) += cifs_spnego.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
>> > > +smbfs-$(CONFIG_SMBFS_DFS_UPCALL) += cifs_dfs_ref.o dfs_cache.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_SWN_UPCALL) += netlink.o cifs_swn.o
>> > > +smbfs-$(CONFIG_SMBFS_SWN_UPCALL) += netlink.o cifs_swn.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
>> > > +smbfs-$(CONFIG_SMBFS_FSCACHE) += fscache.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
>> > > +smbfs-$(CONFIG_SMBFS_SMB_DIRECT) += smbdirect.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
>> > > +smbfs-$(CONFIG_SMBFS_ROOT) += cifsroot.o
>> > >
>> > > -cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
>> > > +smbfs-$(CONFIG_SMBFS_ALLOW_INSECURE_LEGACY) += smb1ops.o
>> > > diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
>> > > index 11fd85de7217..ae588a8caa90 100644
>> > > --- a/fs/cifs/cifs_debug.c
>> > > +++ b/fs/cifs/cifs_debug.c
>> > > @@ -15,12 +15,12 @@
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > #include "cifs_debug.h"
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "fs_context.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > #include "smbdirect.h"
>> > > #endif
>> > > #include "cifs_swn.h"
>> > > @@ -35,7 +35,7 @@ cifs_dump_mem(char *label, void *data, int length)
>> > >
>> > > void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
>> > > {
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > struct smb_hdr *smb = buf;
>> > >
>> > > cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
>> > > @@ -43,12 +43,12 @@ void cifs_dump_detail(void *buf, struct TCP_Server_Info *server)
>> > > smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
>> > > cifs_dbg(VFS, "smb buf %p len %u\n", smb,
>> > > server->ops->calc_smb_size(smb, server));
>> > > -#endif /* CONFIG_CIFS_DEBUG2 */
>> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
>> > > }
>> > >
>> > > void cifs_dump_mids(struct TCP_Server_Info *server)
>> > > {
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > struct mid_q_entry *mid_entry;
>> > >
>> > > if (server == NULL)
>> > > @@ -63,7 +63,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
>> > > mid_entry->pid,
>> > > mid_entry->callback_data,
>> > > mid_entry->mid);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
>> > > mid_entry->large_buf,
>> > > mid_entry->resp_buf,
>> > > @@ -79,7 +79,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
>> > > }
>> > > }
>> > > spin_unlock(&server->mid_lock);
>> > > -#endif /* CONFIG_CIFS_DEBUG2 */
>> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
>> > > }
>> > >
>> > > #ifdef CONFIG_PROC_FS
>> > > @@ -176,7 +176,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
>> > > seq_puts(m, "# Version:1\n");
>> > > seq_puts(m, "# Format:\n");
>> > > seq_puts(m, "# <tree id> <persistent fid> <flags> <count> <pid> <uid>");
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > seq_printf(m, " <filename> <mid>\n");
>> > > #else
>> > > seq_printf(m, " <filename>\n");
>> > > @@ -196,7 +196,7 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
>> > > cfile->pid,
>> > > from_kuid(&init_user_ns, cfile->uid),
>> > > cfile->dentry);
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > seq_printf(m, " %llu\n", cfile->fid.mid);
>> > > #else
>> > > seq_printf(m, "\n");
>> > > @@ -225,39 +225,39 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>> > > "---------------------------------------------------\n");
>> > > seq_printf(m, "CIFS Version %s\n", CIFS_VERSION);
>> > > seq_printf(m, "Features:");
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > seq_printf(m, " DFS");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_FSCACHE
>> > > +#ifdef CONFIG_SMBFS_FSCACHE
>> > > seq_printf(m, ",FSCACHE");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > seq_printf(m, ",SMB_DIRECT");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > seq_printf(m, ",STATS2");
>> > > #else
>> > > seq_printf(m, ",STATS");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > seq_printf(m, ",DEBUG2");
>> > > -#elif defined(CONFIG_CIFS_DEBUG)
>> > > +#elif defined(CONFIG_SMBFS_DEBUG)
>> > > seq_printf(m, ",DEBUG");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > seq_printf(m, ",ALLOW_INSECURE_LEGACY");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > seq_printf(m, ",CIFS_POSIX");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > seq_printf(m, ",UPCALL(SPNEGO)");
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > seq_printf(m, ",XATTR");
>> > > #endif
>> > > seq_printf(m, ",ACL");
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > seq_puts(m, ",WITNESS");
>> > > #endif
>> > > seq_putc(m, '\n');
>> > > @@ -279,7 +279,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
>> > >
>> > > if (server->hostname)
>> > > seq_printf(m, "Hostname: %s ", server->hostname);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (!server->rdma)
>> > > goto skip_rdma;
>> > >
>> > > @@ -498,12 +498,12 @@ static ssize_t cifs_stats_proc_write(struct file *file,
>> > >
>> > > rc = kstrtobool_from_user(buffer, count, &bv);
>> > > if (rc == 0) {
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > int i;
>> > >
>> > > atomic_set(&total_buf_alloc_count, 0);
>> > > atomic_set(&total_small_buf_alloc_count, 0);
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > > atomic_set(&tcpSesReconnectCount, 0);
>> > > atomic_set(&tconInfoReconnectCount, 0);
>> > >
>> > > @@ -514,7 +514,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
>> > > spin_lock(&cifs_tcp_ses_lock);
>> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
>> > > server->max_in_flight = 0;
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > for (i = 0; i < NUMBER_OF_SMB2_COMMANDS; i++) {
>> > > atomic_set(&server->num_cmds[i], 0);
>> > > atomic_set(&server->smb2slowcmd[i], 0);
>> > > @@ -522,7 +522,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
>> > > server->slowest_cmd[i] = 0;
>> > > server->fastest_cmd[0] = 0;
>> > > }
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > > list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) {
>> > > list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
>> > > atomic_set(&tcon->num_smbs_sent, 0);
>> > > @@ -546,7 +546,7 @@ static ssize_t cifs_stats_proc_write(struct file *file,
>> > > static int cifs_stats_proc_show(struct seq_file *m, void *v)
>> > > {
>> > > int i;
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > int j;
>> > > #endif /* STATS2 */
>> > > struct TCP_Server_Info *server;
>> > > @@ -562,11 +562,11 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
>> > > cifs_min_rcv + tcpSesAllocCount.counter);
>> > > seq_printf(m, "SMB Small Req/Resp Buffer: %d Pool size: %d\n",
>> > > small_buf_alloc_count.counter, cifs_min_small);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > seq_printf(m, "Total Large %d Small %d Allocations\n",
>> > > atomic_read(&total_buf_alloc_count),
>> > > atomic_read(&total_small_buf_alloc_count));
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > >
>> > > seq_printf(m, "Operations (MIDs): %d\n", atomic_read(&mid_count));
>> > > seq_printf(m,
>> > > @@ -581,7 +581,7 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v)
>> > > spin_lock(&cifs_tcp_ses_lock);
>> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
>> > > seq_printf(m, "\nMax requests in flight: %d", server->max_in_flight);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > seq_puts(m, "\nTotal time spent processing by command. Time ");
>> > > seq_printf(m, "units are jiffies (%d per second)\n", HZ);
>> > > seq_puts(m, " SMB3 CMD\tNumber\tTotal Time\tFastest\tSlowest\n");
>> > > @@ -630,7 +630,7 @@ static const struct proc_ops cifs_stats_proc_ops = {
>> > > .proc_write = cifs_stats_proc_write,
>> > > };
>> > >
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > #define PROC_FILE_DEFINE(name) \
>> > > static ssize_t name##_write(struct file *file, const char __user *buffer, \
>> > > size_t count, loff_t *ppos) \
>> > > @@ -702,11 +702,11 @@ cifs_proc_init(void)
>> > >
>> > > proc_create("mount_params", 0444, proc_fs_cifs, &cifs_mount_params_proc_ops);
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > proc_create("dfscache", 0644, proc_fs_cifs, &dfscache_proc_ops);
>> > > #endif
>> > >
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > proc_create("rdma_readwrite_threshold", 0644, proc_fs_cifs,
>> > > &cifs_rdma_readwrite_threshold_proc_fops);
>> > > proc_create("smbd_max_frmr_depth", 0644, proc_fs_cifs,
>> > > @@ -742,10 +742,10 @@ cifs_proc_clean(void)
>> > > remove_proc_entry("LookupCacheEnabled", proc_fs_cifs);
>> > > remove_proc_entry("mount_params", proc_fs_cifs);
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > remove_proc_entry("dfscache", proc_fs_cifs);
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > remove_proc_entry("rdma_readwrite_threshold", proc_fs_cifs);
>> > > remove_proc_entry("smbd_max_frmr_depth", proc_fs_cifs);
>> > > remove_proc_entry("smbd_keep_alive_interval", proc_fs_cifs);
>> > > @@ -972,7 +972,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
>> > >
>> > > cifs_security_flags_handle_must_flags(&flags);
>> > >
>> > > - /* flags look ok - update the global security flags for cifs module */
>> > > + /* flags look ok - update global security flags */
>> > > global_secflags = flags;
>> > > if (global_secflags & CIFSSEC_MUST_SIGN) {
>> > > /* requiring signing implies signing is allowed */
>> > > diff --git a/fs/cifs/cifs_debug.h b/fs/cifs/cifs_debug.h
>> > > index ee4ea2b60c0f..fd6d563b0e81 100644
>> > > --- a/fs/cifs/cifs_debug.h
>> > > +++ b/fs/cifs/cifs_debug.h
>> > > @@ -26,7 +26,7 @@ void dump_smb(void *, int);
>> > > #define VFS 1
>> > > #define FYI 2
>> > > extern int cifsFYI;
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > #define NOISY 4
>> > > #else
>> > > #define NOISY 0
>> > > @@ -37,7 +37,7 @@ extern int cifsFYI;
>> > > * debug ON
>> > > * --------
>> > > */
>> > > -#ifdef CONFIG_CIFS_DEBUG
>> > > +#ifdef CONFIG_SMBFS_DEBUG
>> > >
>> > >
>> > > /*
>> > > diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
>> > > index b0864da9ef43..c58e67bf62f0 100644
>> > > --- a/fs/cifs/cifs_dfs_ref.c
>> > > +++ b/fs/cifs/cifs_dfs_ref.c
>> > > @@ -18,7 +18,7 @@
>> > > #include <linux/inet.h>
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "dns_resolve.h"
>> > > #include "cifs_debug.h"
>> > > #include "cifs_unicode.h"
>> > > diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
>> > > index 342717bf1dc2..fd49a1490daf 100644
>> > > --- a/fs/cifs/cifs_spnego.c
>> > > +++ b/fs/cifs/cifs_spnego.c
>> > > @@ -161,13 +161,13 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo,
>> > > spnego_key = request_key(&cifs_spnego_key_type, description, "");
>> > > revert_creds(saved_cred);
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > if (cifsFYI && !IS_ERR(spnego_key)) {
>> > > struct cifs_spnego_msg *msg = spnego_key->payload.data[0];
>> > > cifs_dump_mem("SPNEGO reply blob:", msg->data, min(1024U,
>> > > msg->secblob_len + msg->sesskey_len));
>> > > }
>> > > -#endif /* CONFIG_CIFS_DEBUG2 */
>> > > +#endif /* CONFIG_SMBFS_DEBUG2 */
>> > >
>> > > out:
>> > > kfree(description);
>> > > diff --git a/fs/cifs/cifs_swn.h b/fs/cifs/cifs_swn.h
>> > > index 8a9d2a5c9077..1b9da6281131 100644
>> > > --- a/fs/cifs/cifs_swn.h
>> > > +++ b/fs/cifs/cifs_swn.h
>> > > @@ -13,7 +13,7 @@ struct cifs_tcon;
>> > > struct sk_buff;
>> > > struct genl_info;
>> > >
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > extern int cifs_swn_register(struct cifs_tcon *tcon);
>> > >
>> > > extern int cifs_swn_unregister(struct cifs_tcon *tcon);
>> > > @@ -48,5 +48,5 @@ static inline void cifs_swn_check(void) {}
>> > > static inline bool cifs_swn_set_server_dstaddr(struct TCP_Server_Info *server) { return false; }
>> > > static inline void cifs_swn_reset_server_dstaddr(struct TCP_Server_Info *server) {}
>> > >
>> > > -#endif /* CONFIG_CIFS_SWN_UPCALL */
>> > > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
>> > > #endif /* _CIFS_SWN_H */
>> > > diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
>> > > index bf861fef2f0c..67e06386cfff 100644
>> > > --- a/fs/cifs/cifsacl.c
>> > > +++ b/fs/cifs/cifsacl.c
>> > > @@ -717,7 +717,7 @@ static __u16 fill_ace_for_sid(struct cifs_ace *pntace,
>> > > }
>> > >
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > static void dump_ace(struct cifs_ace *pace, char *end_of_acl)
>> > > {
>> > > int num_subauth;
>> > > @@ -803,7 +803,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
>> > >
>> > > for (i = 0; i < num_aces; ++i) {
>> > > ppace[i] = (struct cifs_ace *) (acl_base + acl_size);
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > dump_ace(ppace[i], end_of_acl);
>> > > #endif
>> > > if (mode_from_special_sid &&
>> > > @@ -1162,7 +1162,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
>> > > return -EINVAL;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > if (psid->num_subauth) {
>> > > int i;
>> > > cifs_dbg(FYI, "SID revision %d num_auth %d\n",
>> > > diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
>> > > index 3070407cafa7..58db1157d53c 100644
>> > > --- a/fs/cifs/cifsglob.h
>> > > +++ b/fs/cifs/cifsglob.h
>> > > @@ -691,7 +691,7 @@ struct TCP_Server_Info {
>> > > unsigned int total_read; /* total amount of data read in this pass */
>> > > atomic_t in_send; /* requests trying to send */
>> > > atomic_t num_waiters; /* blocked waiting to get in sendrecv */
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
>> > > atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
>> > > __u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
>> > > @@ -728,11 +728,11 @@ struct TCP_Server_Info {
>> > > #define CIFS_SERVER_IS_CHAN(server) (!!(server)->primary_server)
>> > > struct TCP_Server_Info *primary_server;
>> > >
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > bool use_swn_dstaddr;
>> > > struct sockaddr_storage swn_dstaddr;
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > bool is_dfs_conn; /* if a dfs connection */
>> > > struct mutex refpath_lock; /* protects leaf_fullpath */
>> > > /*
>> > > @@ -1252,14 +1252,14 @@ struct cifs_tcon {
>> > > __u32 max_chunks;
>> > > __u32 max_bytes_chunk;
>> > > __u32 max_bytes_copy;
>> > > -#ifdef CONFIG_CIFS_FSCACHE
>> > > +#ifdef CONFIG_SMBFS_FSCACHE
>> > > u64 resource_id; /* server resource id */
>> > > struct fscache_volume *fscache; /* cookie for share */
>> > > #endif
>> > > struct list_head pending_opens; /* list of incomplete opens */
>> > > struct cached_fid crfid; /* Cached root fid */
>> > > /* BB add field for back pointer to sb struct(s)? */
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > struct list_head ulist; /* cache update list */
>> > > #endif
>> > > struct delayed_work query_interfaces; /* query interfaces workqueue job */
>> > > @@ -1384,7 +1384,7 @@ struct cifs_fid {
>> > > __u32 access;
>> > > struct cifs_pending_open *pending_open;
>> > > unsigned int epoch;
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > __u64 mid;
>> > > #endif /* CIFS_DEBUG2 */
>> > > bool purge_cache;
>> > > @@ -1481,7 +1481,7 @@ struct cifs_readdata {
>> > > struct iov_iter *iter);
>> > > struct kvec iov[2];
>> > > struct TCP_Server_Info *server;
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > struct smbd_mr *mr;
>> > > #endif
>> > > unsigned int pagesz;
>> > > @@ -1506,7 +1506,7 @@ struct cifs_writedata {
>> > > unsigned int bytes;
>> > > int result;
>> > > struct TCP_Server_Info *server;
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > struct smbd_mr *mr;
>> > > #endif
>> > > unsigned int pagesz;
>> > > @@ -1689,7 +1689,7 @@ struct mid_q_entry {
>> > > __u32 pid; /* process id */
>> > > __u32 sequence_number; /* for CIFS signing */
>> > > unsigned long when_alloc; /* when mid was created */
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > unsigned long when_sent; /* time when smb send finished */
>> > > unsigned long when_received; /* when demux complete (taken off wire) */
>> > > #endif
>> > > @@ -1740,7 +1740,7 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
>> > > atomic_dec(&server->num_waiters);
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > static inline void cifs_save_when_sent(struct mid_q_entry *mid)
>> > > {
>> > > mid->when_sent = jiffies;
>> > > @@ -1878,7 +1878,7 @@ result of setting MUST flags more than once will be to
>> > > require use of the stronger protocol */
>> > > #define CIFSSEC_MUST_NTLMV2 0x04004
>> > > #define CIFSSEC_MUST_KRB5 0x08008
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > #define CIFSSEC_MASK 0x8F08F /* flags supported if no weak allowed */
>> > > #else
>> > > #define CIFSSEC_MASK 0x87087 /* flags supported if no weak allowed */
>> > > @@ -2023,7 +2023,7 @@ extern atomic_t tconInfoReconnectCount;
>> > > /* Various Debug counters */
>> > > extern atomic_t buf_alloc_count; /* current number allocated */
>> > > extern atomic_t small_buf_alloc_count;
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > extern atomic_t total_buf_alloc_count; /* total allocated over all time */
>> > > extern atomic_t total_small_buf_alloc_count;
>> > > extern unsigned int slow_rsp_threshold; /* number of secs before logging */
>> > > @@ -2063,7 +2063,7 @@ extern mempool_t *cifs_mid_poolp;
>> > > /* Operations for different SMB versions */
>> > > #define SMB1_VERSION_STRING "1.0"
>> > > #define SMB20_VERSION_STRING "2.0"
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > extern struct smb_version_operations smb1_operations;
>> > > extern struct smb_version_values smb1_values;
>> > > extern struct smb_version_operations smb20_operations;
>> > > diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
>> > > index aeba371c4c70..0c24fcbb6622 100644
>> > > --- a/fs/cifs/cifspdu.h
>> > > +++ b/fs/cifs/cifspdu.h
>> > > @@ -2152,7 +2152,7 @@ typedef struct {
>> > > #define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x00000200 /* must do */
>> > > #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
>> > > QFS PROXY call */
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
>> > > LockingX instead of posix locking call on unix sess (and we do not expect
>> > > LockingX to use different (ie Windows) semantics than posix locking on
>> > > @@ -2162,7 +2162,7 @@ typedef struct {
>> > > #define CIFS_UNIX_CAP_MASK 0x000003db
>> > > #else
>> > > #define CIFS_UNIX_CAP_MASK 0x00000013
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > >
>> > >
>> > > #define CIFS_POSIX_EXTENSIONS 0x00000010 /* support for new QFSInfo */
>> > > @@ -2607,7 +2607,7 @@ struct data_blob {
>> > > } __attribute__((packed));
>> > >
>> > >
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > /*
>> > > For better POSIX semantics from Linux client, (even better
>> > > than the existing CIFS Unix Extensions) we need updated PDUs for:
>> > > diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
>> > > index d59aebefa71c..fd225e5d2456 100644
>> > > --- a/fs/cifs/cifsproto.h
>> > > +++ b/fs/cifs/cifsproto.h
>> > > @@ -9,7 +9,7 @@
>> > > #define _CIFSPROTO_H
>> > > #include <linux/nls.h>
>> > > #include "trace.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > >
>> > > @@ -284,11 +284,11 @@ extern void cifs_put_tcp_session(struct TCP_Server_Info *server,
>> > > int from_reconnect);
>> > > extern void cifs_put_tcon(struct cifs_tcon *tcon);
>> > >
>> > > -#if IS_ENABLED(CONFIG_CIFS_DFS_UPCALL)
>> > > +#if IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL)
>> > > extern void cifs_dfs_release_automount_timer(void);
>> > > -#else /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
>> > > +#else /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
>> > > #define cifs_dfs_release_automount_timer() do { } while (0)
>> > > -#endif /* ! IS_ENABLED(CONFIG_CIFS_DFS_UPCALL) */
>> > > +#endif /* ! IS_ENABLED(CONFIG_SMBFS_DFS_UPCALL) */
>> > >
>> > > void cifs_proc_init(void);
>> > > void cifs_proc_clean(void);
>> > > @@ -656,7 +656,7 @@ int cifs_update_super_prepath(struct cifs_sb_info *cifs_sb, char *prefix);
>> > > char *extract_hostname(const char *unc);
>> > > char *extract_sharename(const char *unc);
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
>> > > const char *old_path,
>> > > const struct nls_table *nls_codepage,
>> > > diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
>> > > index 04a4c304d004..3177fc3a2321 100644
>> > > --- a/fs/cifs/cifssmb.c
>> > > +++ b/fs/cifs/cifssmb.c
>> > > @@ -32,11 +32,11 @@
>> > > #include "smb2proto.h"
>> > > #include "fscache.h"
>> > > #include "smbdirect.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > >
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > static struct {
>> > > int index;
>> > > char *name;
>> > > @@ -56,7 +56,7 @@ static struct {
>> > > #endif
>> > >
>> > > /* define the number of elements in the cifs dialect array */
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > #define CIFS_NUM_PROT 2
>> > > #else /* not posix */
>> > > #define CIFS_NUM_PROT 1
>> > > @@ -1528,7 +1528,7 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
>> > > }
>> > >
>> > > /* how much data is in the response? */
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > use_rdma_mr = rdata->mr;
>> > > #endif
>> > > data_len = server->ops->read_data_length(buf, use_rdma_mr);
>> > > @@ -1914,7 +1914,7 @@ cifs_writedata_release(struct kref *refcount)
>> > > {
>> > > struct cifs_writedata *wdata = container_of(refcount,
>> > > struct cifs_writedata, refcount);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (wdata->mr) {
>> > > smbd_deregister_mr(wdata->mr);
>> > > wdata->mr = NULL;
>> > > @@ -3360,7 +3360,7 @@ CIFSSMB_set_compression(const unsigned int xid, struct cifs_tcon *tcon,
>> > > }
>> > >
>> > >
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > >
>> > > /*Convert an Access Control Entry from wire format to local POSIX xattr format*/
>> > > static void cifs_convert_ace(struct posix_acl_xattr_entry *ace,
>> > > @@ -6054,7 +6054,7 @@ CIFSSMBUnixSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > /*
>> > > * Do a path-based QUERY_ALL_EAS call and parse the result. This is a common
>> > > * function used by listxattr and getxattr type calls. When ea_name is set,
>> > > diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
>> > > index 1362210f3ece..90d0254e2735 100644
>> > > --- a/fs/cifs/connect.c
>> > > +++ b/fs/cifs/connect.c
>> > > @@ -45,7 +45,7 @@
>> > > #include "smb2proto.h"
>> > > #include "smbdirect.h"
>> > > #include "dns_resolve.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > > #include "fs_context.h"
>> > > @@ -68,7 +68,7 @@ struct mount_ctx {
>> > > struct TCP_Server_Info *server;
>> > > struct cifs_ses *ses;
>> > > struct cifs_tcon *tcon;
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > struct cifs_ses *root_ses;
>> > > uuid_t mount_id;
>> > > char *origin_fullpath, *leaf_fullpath;
>> > > @@ -429,7 +429,7 @@ static int __cifs_reconnect(struct TCP_Server_Info *server,
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > static int __reconnect_target_unlocked(struct TCP_Server_Info *server, const char *target)
>> > > {
>> > > int rc;
>> > > @@ -841,7 +841,7 @@ is_smb_response(struct TCP_Server_Info *server, unsigned char type)
>> > > void
>> > > dequeue_mid(struct mid_q_entry *mid, bool malformed)
>> > > {
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > mid->when_received = jiffies;
>> > > #endif
>> > > spin_lock(&mid->server->mid_lock);
>> > > @@ -983,7 +983,7 @@ static void clean_demultiplex_info(struct TCP_Server_Info *server)
>> > > */
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > kfree(server->origin_fullpath);
>> > > kfree(server->leaf_fullpath);
>> > > #endif
>> > > @@ -1238,7 +1238,7 @@ cifs_demultiplex_thread(void *p)
>> > > cifs_dump_mem("Received Data is: ", bufs[i],
>> > > HEADER_SIZE(server));
>> > > smb2_add_credits_from_hdr(bufs[i], server);
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > if (server->ops->dump_detail)
>> > > server->ops->dump_detail(bufs[i],
>> > > server);
>> > > @@ -1467,7 +1467,7 @@ cifs_find_tcp_session(struct smb3_fs_context *ctx)
>> > > spin_lock(&cifs_tcp_ses_lock);
>> > > list_for_each_entry(server, &cifs_tcp_ses_list, tcp_ses_list) {
>> > > spin_lock(&server->srv_lock);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > /*
>> > > * DFS failover implementation in cifs_reconnect() requires unique tcp sessions for
>> > > * DFS connections to do failover properly, so avoid sharing them with regular
>> > > @@ -1621,7 +1621,7 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
>> > > INIT_DELAYED_WORK(&tcp_ses->resolve, cifs_resolve_server);
>> > > INIT_DELAYED_WORK(&tcp_ses->reconnect, smb2_reconnect_server);
>> > > mutex_init(&tcp_ses->reconnect_mutex);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > mutex_init(&tcp_ses->refpath_lock);
>> > > #endif
>> > > memcpy(&tcp_ses->srcaddr, &ctx->srcaddr,
>> > > @@ -1647,8 +1647,8 @@ cifs_get_tcp_session(struct smb3_fs_context *ctx,
>> > > else
>> > > tcp_ses->echo_interval = SMB_ECHO_INTERVAL_DEFAULT * HZ;
>> > > if (tcp_ses->rdma) {
>> > > -#ifndef CONFIG_CIFS_SMB_DIRECT
>> > > - cifs_dbg(VFS, "CONFIG_CIFS_SMB_DIRECT is not enabled\n");
>> > > +#ifndef CONFIG_SMBFS_SMB_DIRECT
>> > > + cifs_dbg(VFS, "CONFIG_SMBFS_SMB_DIRECT is not enabled\n");
>> > > rc = -ENOENT;
>> > > goto out_err_crypto_release;
>> > > #endif
>> > > @@ -2496,7 +2496,7 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
>> > > }
>> > >
>> > > tcon->use_witness = false;
>> > > - if (IS_ENABLED(CONFIG_CIFS_SWN_UPCALL) && ctx->witness) {
>> > > + if (IS_ENABLED(CONFIG_SMBFS_SWN_UPCALL) && ctx->witness) {
>> > > if (ses->server->vals->protocol_id >= SMB30_PROT_ID) {
>> > > if (tcon->capabilities & SMB2_SHARE_CAP_CLUSTER) {
>> > > /*
>> > > @@ -3052,7 +3052,7 @@ void reset_cifs_unix_caps(unsigned int xid, struct cifs_tcon *tcon,
>> > > }
>> > >
>> > > cifs_dbg(FYI, "Negotiate caps 0x%x\n", (int)cap);
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > if (cap & CIFS_UNIX_FCNTL_CAP)
>> > > cifs_dbg(FYI, "FCNTL cap\n");
>> > > if (cap & CIFS_UNIX_EXTATTR_CAP)
>> > > @@ -3285,7 +3285,7 @@ static int mount_setup_tlink(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
>> > > return 0;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > /* Get unique dfs connections */
>> > > static int mount_get_dfs_conns(struct mount_ctx *mnt_ctx)
>> > > {
>> > > @@ -3486,7 +3486,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
>> > > struct cifs_tcon *tcon = mnt_ctx->tcon;
>> > > struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
>> > > char *full_path;
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
>> > > #endif
>> > >
>> > > @@ -3505,7 +3505,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
>> > >
>> > > rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
>> > > full_path);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > if (nodfs) {
>> > > if (rc == -EREMOTE)
>> > > rc = -EOPNOTSUPP;
>> > > @@ -3536,7 +3536,7 @@ static int is_path_remote(struct mount_ctx *mnt_ctx)
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > static void set_root_ses(struct mount_ctx *mnt_ctx)
>> > > {
>> > > if (mnt_ctx->ses) {
>> > > @@ -3996,7 +3996,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb)
>> > > spin_unlock(&cifs_sb->tlink_tree_lock);
>> > >
>> > > kfree(cifs_sb->prepath);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > dfs_cache_put_refsrv_sessions(&cifs_sb->dfs_mount_id);
>> > > #endif
>> > > call_rcu(&cifs_sb->rcu, delayed_free);
>> > > @@ -4383,7 +4383,7 @@ cifs_prune_tlinks(struct work_struct *work)
>> > > TLINK_IDLE_EXPIRE);
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > /* Update dfs referral path of superblock */
>> > > static int update_server_fullpath(struct TCP_Server_Info *server, struct cifs_sb_info *cifs_sb,
>> > > const char *target)
>> > > diff --git a/fs/cifs/cifsfs.c b/fs/cifs/core.c
>> > > similarity index 98%
>> > > rename from fs/cifs/cifsfs.c
>> > > rename to fs/cifs/core.c
>> > > index af4c5632490e..8b135c1cd5ae 100644
>> > > --- a/fs/cifs/cifsfs.c
>> > > +++ b/fs/cifs/core.c
>> > > @@ -4,7 +4,7 @@
>> > > * Copyright (C) International Business Machines Corp., 2002,2008
>> > > * Author(s): Steve French ([email protected])
>> > > *
>> > > - * Common Internet FileSystem (CIFS) client
>> > > + * SMBFS client
>> > > *
>> > > */
>> > >
>> > > @@ -28,7 +28,7 @@
>> > > #include <linux/xattr.h>
>> > > #include <uapi/linux/magic.h>
>> > > #include <net/ipv6.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #define DECLARE_GLOBALS_HERE
>> > > #include "cifsglob.h"
>> > > @@ -39,10 +39,10 @@
>> > > #include <linux/key-type.h>
>> > > #include "cifs_spnego.h"
>> > > #include "fscache.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > #include "netlink.h"
>> > > #endif
>> > > #include "fs_context.h"
>> > > @@ -90,7 +90,7 @@ atomic_t tconInfoReconnectCount;
>> > > atomic_t mid_count;
>> > > atomic_t buf_alloc_count;
>> > > atomic_t small_buf_alloc_count;
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > atomic_t total_buf_alloc_count;
>> > > atomic_t total_small_buf_alloc_count;
>> > > #endif/* STATS2 */
>> > > @@ -115,7 +115,7 @@ module_param(cifs_max_pending, uint, 0444);
>> > > MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server for "
>> > > "CIFS/SMB1 dialect (N/A for SMB3) "
>> > > "Default: 32767 Range: 2 to 32767.");
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > unsigned int slow_rsp_threshold = 1;
>> > > module_param(slow_rsp_threshold, uint, 0644);
>> > > MODULE_PARM_DESC(slow_rsp_threshold, "Amount of time (in seconds) to wait "
>> > > @@ -266,12 +266,12 @@ cifs_read_super(struct super_block *sb)
>> > > goto out_no_root;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
>> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
>> > > if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
>> > > cifs_dbg(FYI, "export ops supported\n");
>> > > sb->s_export_op = &cifs_export_ops;
>> > > }
>> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
>> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>> > >
>> > > return 0;
>> > >
>> > > @@ -759,7 +759,7 @@ static void cifs_umount_begin(struct super_block *sb)
>> > > return;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > static int cifs_show_stats(struct seq_file *s, struct dentry *root)
>> > > {
>> > > /* BB FIXME */
>> > > @@ -797,7 +797,7 @@ static const struct super_operations cifs_super_ops = {
>> > > as opens */
>> > > .show_options = cifs_show_options,
>> > > .umount_begin = cifs_umount_begin,
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > .show_stats = cifs_show_stats,
>> > > #endif
>> > > };
>> > > @@ -1116,6 +1116,7 @@ struct file_system_type cifs_fs_type = {
>> > > .fs_flags = FS_RENAME_DOES_D_MOVE,
>> > > };
>> > > MODULE_ALIAS_FS("cifs");
>> > > +MODULE_ALIAS("cifs");
>> > >
>> > > struct file_system_type smb3_fs_type = {
>> > > .owner = THIS_MODULE,
>> > > @@ -1612,7 +1613,7 @@ init_cifs(void)
>> > >
>> > > atomic_set(&buf_alloc_count, 0);
>> > > atomic_set(&small_buf_alloc_count, 0);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > atomic_set(&total_buf_alloc_count, 0);
>> > > atomic_set(&total_small_buf_alloc_count, 0);
>> > > if (slow_rsp_threshold < 1)
>> > > @@ -1620,7 +1621,7 @@ init_cifs(void)
>> > > else if (slow_rsp_threshold > 32767)
>> > > cifs_dbg(VFS,
>> > > "slow response threshold set higher than recommended (0 to 32767)\n");
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > >
>> > > atomic_set(&mid_count, 0);
>> > > GlobalCurrentXid = 0;
>> > > @@ -1693,21 +1694,21 @@ init_cifs(void)
>> > > if (rc)
>> > > goto out_destroy_mids;
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > rc = dfs_cache_init();
>> > > if (rc)
>> > > goto out_destroy_request_bufs;
>> > > -#endif /* CONFIG_CIFS_DFS_UPCALL */
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#endif /* CONFIG_SMBFS_DFS_UPCALL */
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > rc = init_cifs_spnego();
>> > > if (rc)
>> > > goto out_destroy_dfs_cache;
>> > > -#endif /* CONFIG_CIFS_UPCALL */
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#endif /* CONFIG_SMBFS_UPCALL */
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > rc = cifs_genl_init();
>> > > if (rc)
>> > > goto out_register_key_type;
>> > > -#endif /* CONFIG_CIFS_SWN_UPCALL */
>> > > +#endif /* CONFIG_SMBFS_SWN_UPCALL */
>> > >
>> > > rc = init_cifs_idmap();
>> > > if (rc)
>> > > @@ -1728,15 +1729,15 @@ init_cifs(void)
>> > > out_init_cifs_idmap:
>> > > exit_cifs_idmap();
>> > > out_cifs_swn_init:
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > cifs_genl_exit();
>> > > out_register_key_type:
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > exit_cifs_spnego();
>> > > out_destroy_dfs_cache:
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > dfs_cache_destroy();
>> > > out_destroy_request_bufs:
>> > > #endif
>> > > @@ -1768,13 +1769,13 @@ exit_cifs(void)
>> > > unregister_filesystem(&smb3_fs_type);
>> > > cifs_dfs_release_automount_timer();
>> > > exit_cifs_idmap();
>> > > -#ifdef CONFIG_CIFS_SWN_UPCALL
>> > > +#ifdef CONFIG_SMBFS_SWN_UPCALL
>> > > cifs_genl_exit();
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > exit_cifs_spnego();
>> > > #endif
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > dfs_cache_destroy();
>> > > #endif
>> > > cifs_destroy_request_bufs();
>> > > diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
>> > > index a9b6c3eba6de..f0d2d2c49f9e 100644
>> > > --- a/fs/cifs/dfs_cache.c
>> > > +++ b/fs/cifs/dfs_cache.c
>> > > @@ -334,7 +334,7 @@ const struct proc_ops dfscache_proc_ops = {
>> > > .proc_write = dfscache_proc_write,
>> > > };
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > static inline void dump_tgts(const struct cache_entry *ce)
>> > > {
>> > > struct cache_dfs_tgt *t;
>> > > diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
>> > > index ce9b22aecfba..5b3728631552 100644
>> > > --- a/fs/cifs/dir.c
>> > > +++ b/fs/cifs/dir.c
>> > > @@ -13,7 +13,7 @@
>> > > #include <linux/namei.h>
>> > > #include <linux/mount.h>
>> > > #include <linux/file.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > diff --git a/fs/cifs/export.c b/fs/cifs/export.c
>> > > index 37c28415df1e..0395ef73b06d 100644
>> > > --- a/fs/cifs/export.c
>> > > +++ b/fs/cifs/export.c
>> > > @@ -4,8 +4,6 @@
>> > > * Copyright (C) International Business Machines Corp., 2007
>> > > * Author(s): Steve French ([email protected])
>> > > *
>> > > - * Common Internet FileSystem (CIFS) client
>> > > - *
>> > > * Operations related to support for exporting files via NFSD
>> > > *
>> > > */
>> > > @@ -30,9 +28,9 @@
>> > > #include <linux/exportfs.h>
>> > > #include "cifsglob.h"
>> > > #include "cifs_debug.h"
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > >
>> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
>> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
>> > > static struct dentry *cifs_get_parent(struct dentry *dentry)
>> > > {
>> > > /* BB need to add code here eventually to enable export via NFSD */
>> > > @@ -50,5 +48,5 @@ const struct export_operations cifs_export_ops = {
>> > > .encode_fs = */
>> > > };
>> > >
>> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
>> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>> > >
>> > > diff --git a/fs/cifs/file.c b/fs/cifs/file.c
>> > > index a592fdf04313..90567ae51fa7 100644
>> > > --- a/fs/cifs/file.c
>> > > +++ b/fs/cifs/file.c
>> > > @@ -22,7 +22,7 @@
>> > > #include <linux/swap.h>
>> > > #include <linux/mm.h>
>> > > #include <asm/div64.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > @@ -2942,7 +2942,7 @@ cifs_resend_wdata(struct cifs_writedata *wdata, struct list_head *wdata_list,
>> > > if (wdata->cfile->invalidHandle)
>> > > rc = -EAGAIN;
>> > > else {
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (wdata->mr) {
>> > > wdata->mr->need_invalidate = true;
>> > > smbd_deregister_mr(wdata->mr);
>> > > @@ -3455,7 +3455,7 @@ cifs_readdata_release(struct kref *refcount)
>> > > {
>> > > struct cifs_readdata *rdata = container_of(refcount,
>> > > struct cifs_readdata, refcount);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (rdata->mr) {
>> > > smbd_deregister_mr(rdata->mr);
>> > > rdata->mr = NULL;
>> > > @@ -3599,7 +3599,7 @@ uncached_fill_pages(struct TCP_Server_Info *server,
>> > > if (iter)
>> > > result = copy_page_from_iter(
>> > > page, page_offset, n, iter);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > else if (rdata->mr)
>> > > result = n;
>> > > #endif
>> > > @@ -3676,7 +3676,7 @@ static int cifs_resend_rdata(struct cifs_readdata *rdata,
>> > > if (rdata->cfile->invalidHandle)
>> > > rc = -EAGAIN;
>> > > else {
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (rdata->mr) {
>> > > rdata->mr->need_invalidate = true;
>> > > smbd_deregister_mr(rdata->mr);
>> > > @@ -4212,7 +4212,7 @@ cifs_page_mkwrite(struct vm_fault *vmf)
>> > > /* Wait for the page to be written to the cache before we allow it to
>> > > * be modified. We then assume the entire page will need writing back.
>> > > */
>> > > -#ifdef CONFIG_CIFS_FSCACHE
>> > > +#ifdef CONFIG_SMBFS_FSCACHE
>> > > if (PageFsCache(page) &&
>> > > wait_on_page_fscache_killable(page) < 0)
>> > > return VM_FAULT_RETRY;
>> > > @@ -4367,7 +4367,7 @@ readpages_fill_pages(struct TCP_Server_Info *server,
>> > > if (iter)
>> > > result = copy_page_from_iter(
>> > > page, page_offset, n, iter);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > else if (rdata->mr)
>> > > result = n;
>> > > #endif
>> > > @@ -4960,7 +4960,7 @@ static void cifs_swap_deactivate(struct file *file)
>> > > * Mark a page as having been made dirty and thus needing writeback. We also
>> > > * need to pin the cache object to write back to.
>> > > */
>> > > -#ifdef CONFIG_CIFS_FSCACHE
>> > > +#ifdef CONFIG_SMBFS_FSCACHE
>> > > static bool cifs_dirty_folio(struct address_space *mapping, struct folio *folio)
>> > > {
>> > > return fscache_dirty_folio(mapping, folio,
>> > > diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
>> > > index 8dc0d923ef6a..a8366986bf73 100644
>> > > --- a/fs/cifs/fs_context.c
>> > > +++ b/fs/cifs/fs_context.c
>> > > @@ -13,7 +13,7 @@
>> > > #include <linux/magic.h>
>> > > #include <linux/security.h>
>> > > #include <net/net_namespace.h>
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > > */
>> > > @@ -25,7 +25,7 @@
>> > > #include <linux/mount.h>
>> > > #include <linux/parser.h>
>> > > #include <linux/utsname.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > @@ -339,7 +339,7 @@ cifs_parse_smb_version(struct fs_context *fc, char *value, struct smb3_fs_contex
>> > > substring_t args[MAX_OPT_ARGS];
>> > >
>> > > switch (match_token(value, cifs_smb_version_tokens, args)) {
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > case Smb_1:
>> > > if (disable_legacy_dialects) {
>> > > cifs_errorf(fc, "mount with legacy dialect disabled\n");
>> > > @@ -825,7 +825,7 @@ static int smb3_reconfigure(struct fs_context *fc)
>> > > smb3_cleanup_fs_context_contents(cifs_sb->ctx);
>> > > rc = smb3_fs_context_dup(cifs_sb->ctx, ctx);
>> > > smb3_update_mnt_flags(cifs_sb);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > if (!rc)
>> > > rc = dfs_cache_remount_fs(cifs_sb);
>> > > #endif
>> > > @@ -1291,16 +1291,16 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
>> > > goto cifs_parse_mount_err;
>> > > break;
>> > > case Opt_witness:
>> > > -#ifndef CONFIG_CIFS_SWN_UPCALL
>> > > - cifs_errorf(fc, "Witness support needs CONFIG_CIFS_SWN_UPCALL config option\n");
>> > > +#ifndef CONFIG_SMBFS_SWN_UPCALL
>> > > + cifs_errorf(fc, "Witness support needs CONFIG_SMBFS_SWN_UPCALL config option\n");
>> > > goto cifs_parse_mount_err;
>> > > #endif
>> > > ctx->witness = true;
>> > > pr_warn_once("Witness protocol support is experimental\n");
>> > > break;
>> > > case Opt_rootfs:
>> > > -#ifndef CONFIG_CIFS_ROOT
>> > > - cifs_dbg(VFS, "rootfs support requires CONFIG_CIFS_ROOT config option\n");
>> > > +#ifndef CONFIG_SMBFS_ROOT
>> > > + cifs_dbg(VFS, "rootfs support requires CONFIG_SMBFS_ROOT config option\n");
>> > > goto cifs_parse_mount_err;
>> > > #endif
>> > > ctx->rootfs = true;
>> > > @@ -1399,8 +1399,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
>> > > pr_warn("Mount option noac not supported. Instead set /proc/fs/cifs/LookupCacheEnabled to 0\n");
>> > > break;
>> > > case Opt_fsc:
>> > > -#ifndef CONFIG_CIFS_FSCACHE
>> > > - cifs_errorf(fc, "FS-Cache support needs CONFIG_CIFS_FSCACHE kernel config option set\n");
>> > > +#ifndef CONFIG_SMBFS_FSCACHE
>> > > + cifs_errorf(fc, "FS-Cache support needs CONFIG_SMBFS_FSCACHE kernel config option set\n");
>> > > goto cifs_parse_mount_err;
>> > > #endif
>> > > ctx->fsc = true;
>> > > diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h
>> > > index aa3b941a5555..ac2e5eb01af5 100644
>> > > --- a/fs/cifs/fscache.h
>> > > +++ b/fs/cifs/fscache.h
>> > > @@ -33,7 +33,7 @@ struct cifs_fscache_inode_coherency_data {
>> > > __le32 last_change_time_nsec;
>> > > };
>> > >
>> > > -#ifdef CONFIG_CIFS_FSCACHE
>> > > +#ifdef CONFIG_SMBFS_FSCACHE
>> > >
>> > > /*
>> > > * fscache.c
>> > > @@ -119,7 +119,7 @@ static inline int cifs_fscache_release_page(struct page *page, gfp_t gfp)
>> > > return true;
>> > > }
>> > >
>> > > -#else /* CONFIG_CIFS_FSCACHE */
>> > > +#else /* CONFIG_SMBFS_FSCACHE */
>> > > static inline
>> > > void cifs_fscache_fill_coherency(struct inode *inode,
>> > > struct cifs_fscache_inode_coherency_data *cd)
>> > > @@ -159,6 +159,6 @@ static inline int nfs_fscache_release_page(struct page *page, gfp_t gfp)
>> > > return true; /* May release page */
>> > > }
>> > >
>> > > -#endif /* CONFIG_CIFS_FSCACHE */
>> > > +#endif /* CONFIG_SMBFS_FSCACHE */
>> > >
>> > > #endif /* _CIFS_FSCACHE_H */
>> > > diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
>> > > index 3ad303dd5e5a..9da2c5644960 100644
>> > > --- a/fs/cifs/inode.c
>> > > +++ b/fs/cifs/inode.c
>> > > @@ -14,7 +14,7 @@
>> > > #include <linux/wait_bit.h>
>> > > #include <linux/fiemap.h>
>> > > #include <asm/div64.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > @@ -57,7 +57,7 @@ static void cifs_set_ops(struct inode *inode)
>> > > inode->i_data.a_ops = &cifs_addr_ops;
>> > > break;
>> > > case S_IFDIR:
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > if (IS_AUTOMOUNT(inode)) {
>> > > inode->i_op = &cifs_dfs_referral_inode_operations;
>> > > } else {
>> > > @@ -552,7 +552,7 @@ cifs_sfu_type(struct cifs_fattr *fattr, const char *path,
>> > > static int cifs_sfu_mode(struct cifs_fattr *fattr, const unsigned char *path,
>> > > struct cifs_sb_info *cifs_sb, unsigned int xid)
>> > > {
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > ssize_t rc;
>> > > char ea_value[4];
>> > > __u32 mode;
>> > > @@ -956,7 +956,7 @@ cifs_get_inode_info(struct inode **inode,
>> > > rc = server->ops->query_path_info(xid, tcon, cifs_sb,
>> > > full_path, tmp_data,
>> > > &adjust_tz, &is_reparse_point);
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > if (rc == -ENOENT && is_tcon_dfs(tcon))
>> > > rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon,
>> > > cifs_sb,
>> > > @@ -1833,7 +1833,7 @@ cifs_posix_mkdir(struct inode *inode, struct dentry *dentry, umode_t mode,
>> > >
>> > > d_instantiate(dentry, newinode);
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > cifs_dbg(FYI, "instantiated dentry %p %pd to inode %p\n",
>> > > dentry, dentry, newinode);
>> > >
>> > > diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c
>> > > index 0359b604bdbc..01f70c5352fd 100644
>> > > --- a/fs/cifs/ioctl.c
>> > > +++ b/fs/cifs/ioctl.c
>> > > @@ -17,7 +17,7 @@
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > #include "cifs_debug.h"
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifs_ioctl.h"
>> > > #include "smb2proto.h"
>> > > #include "smb2glob.h"
>> > > @@ -332,7 +332,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
>> > > break;
>> > > tcon = tlink_tcon(pSMBFile->tlink);
>> > > caps = le64_to_cpu(tcon->fsUnixInfo.Capability);
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > if (CIFS_UNIX_EXTATTR_CAP & caps) {
>> > > __u64 ExtAttrMask = 0;
>> > > rc = CIFSGetExtAttr(xid, tcon,
>> > > @@ -345,7 +345,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)
>> > > if (rc != EOPNOTSUPP)
>> > > break;
>> > > }
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > > rc = 0;
>> > > if (CIFS_I(inode)->cifsAttrs & ATTR_COMPRESSED) {
>> > > /* add in the compressed bit */
>> > > diff --git a/fs/cifs/link.c b/fs/cifs/link.c
>> > > index bbdf3281559c..640a8724ac8e 100644
>> > > --- a/fs/cifs/link.c
>> > > +++ b/fs/cifs/link.c
>> > > @@ -9,7 +9,7 @@
>> > > #include <linux/stat.h>
>> > > #include <linux/slab.h>
>> > > #include <linux/namei.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
>> > > index 7a906067db04..5b03978e658c 100644
>> > > --- a/fs/cifs/misc.c
>> > > +++ b/fs/cifs/misc.c
>> > > @@ -18,8 +18,8 @@
>> > > #include "nterr.h"
>> > > #include "cifs_unicode.h"
>> > > #include "smb2pdu.h"
>> > > -#include "cifsfs.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#include "smbfs.h"
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dns_resolve.h"
>> > > #endif
>> > > #include "fs_context.h"
>> > > @@ -175,9 +175,9 @@ cifs_buf_get(void)
>> > > /* for most paths, more is cleared in header_assemble */
>> > > memset(ret_buf, 0, buf_size + 3);
>> > > atomic_inc(&buf_alloc_count);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > atomic_inc(&total_buf_alloc_count);
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > >
>> > > return ret_buf;
>> > > }
>> > > @@ -208,9 +208,9 @@ cifs_small_buf_get(void)
>> > > /* No need to clear memory here, cleared in header assemble */
>> > > /* memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);*/
>> > > atomic_inc(&small_buf_alloc_count);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > atomic_inc(&total_small_buf_alloc_count);
>> > > -#endif /* CONFIG_CIFS_STATS2 */
>> > > +#endif /* CONFIG_SMBFS_STATS2 */
>> > >
>> > > return ret_buf;
>> > > }
>> > > @@ -1246,7 +1246,7 @@ void cifs_put_tcp_super(struct super_block *sb)
>> > > __cifs_put_super(sb);
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > int match_target_ip(struct TCP_Server_Info *server,
>> > > const char *share, size_t share_len,
>> > > bool *result)
>> > > diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
>> > > index 28caae7aed1b..8d461b29c0e2 100644
>> > > --- a/fs/cifs/netmisc.c
>> > > +++ b/fs/cifs/netmisc.c
>> > > @@ -16,7 +16,7 @@
>> > > #include <asm/div64.h>
>> > > #include <asm/byteorder.h>
>> > > #include <linux/inet.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > diff --git a/fs/cifs/ntlmssp.h b/fs/cifs/ntlmssp.h
>> > > index 55758b9ec877..d22bf9591c3c 100644
>> > > --- a/fs/cifs/ntlmssp.h
>> > > +++ b/fs/cifs/ntlmssp.h
>> > > @@ -93,7 +93,7 @@ typedef struct _NEGOTIATE_MESSAGE {
>> > > struct ntlmssp_version {
>> > > __u8 ProductMajorVersion;
>> > > __u8 ProductMinorVersion;
>> > > - __le16 ProductBuild; /* we send the cifs.ko module version here */
>> > > + __le16 ProductBuild; /* we send the module version here */
>> > > __u8 Reserved[3];
>> > > __u8 NTLMRevisionCurrent; /* currently 0x0F */
>> > > } __packed;
>> > > diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
>> > > index 384cabdf47ca..acfe26e3ec0e 100644
>> > > --- a/fs/cifs/readdir.c
>> > > +++ b/fs/cifs/readdir.c
>> > > @@ -18,7 +18,7 @@
>> > > #include "cifs_unicode.h"
>> > > #include "cifs_debug.h"
>> > > #include "cifs_fs_sb.h"
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "smb2proto.h"
>> > > #include "fs_context.h"
>> > >
>> > > @@ -29,7 +29,7 @@
>> > > */
>> > > #define UNICODE_NAME_MAX ((4 * NAME_MAX) + 2)
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > static void dump_cifs_file_struct(struct file *file, char *label)
>> > > {
>> > > struct cifsFileInfo *cf;
>> > > diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
>> > > index 02c8b2906196..a6288850c7cc 100644
>> > > --- a/fs/cifs/sess.c
>> > > +++ b/fs/cifs/sess.c
>> > > @@ -18,7 +18,7 @@
>> > > #include <linux/utsname.h>
>> > > #include <linux/slab.h>
>> > > #include <linux/version.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifs_spnego.h"
>> > > #include "smb2proto.h"
>> > > #include "fs_context.h"
>> > > @@ -1376,7 +1376,7 @@ sess_auth_ntlmv2(struct sess_data *sess_data)
>> > > ses->auth_key.response = NULL;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > static void
>> > > sess_auth_kerberos(struct sess_data *sess_data)
>> > > {
>> > > @@ -1515,7 +1515,7 @@ sess_auth_kerberos(struct sess_data *sess_data)
>> > > ses->auth_key.response = NULL;
>> > > }
>> > >
>> > > -#endif /* ! CONFIG_CIFS_UPCALL */
>> > > +#endif /* ! CONFIG_SMBFS_UPCALL */
>> > >
>> > > /*
>> > > * The required kvec buffers have to be allocated before calling this
>> > > @@ -1792,13 +1792,13 @@ static int select_sec(struct sess_data *sess_data)
>> > > sess_data->func = sess_auth_ntlmv2;
>> > > break;
>> > > case Kerberos:
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > sess_data->func = sess_auth_kerberos;
>> > > break;
>> > > #else
>> > > cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
>> > > return -ENOSYS;
>> > > -#endif /* CONFIG_CIFS_UPCALL */
>> > > +#endif /* CONFIG_SMBFS_UPCALL */
>> > > case RawNTLMSSP:
>> > > sess_data->func = sess_auth_rawntlmssp_negotiate;
>> > > break;
>> > > diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
>> > > index f36b2d2d40ca..f60b6696a1c1 100644
>> > > --- a/fs/cifs/smb1ops.c
>> > > +++ b/fs/cifs/smb1ops.c
>> > > @@ -926,7 +926,7 @@ cifs_unix_dfs_readlink(const unsigned int xid, struct cifs_tcon *tcon,
>> > > const unsigned char *searchName, char **symlinkinfo,
>> > > const struct nls_table *nls_codepage)
>> > > {
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > int rc;
>> > > struct dfs_info3_param referral = {0};
>> > >
>> > > @@ -1226,7 +1226,7 @@ struct smb_version_operations smb1_operations = {
>> > > .wp_retry_size = cifs_wp_retry_size,
>> > > .dir_needs_close = cifs_dir_needs_close,
>> > > .select_sectype = cifs_select_sectype,
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > .query_all_EAs = CIFSSMBQAllEAs,
>> > > .set_EA = CIFSSMBSetEA,
>> > > #endif /* CIFS_XATTR */
>> > > diff --git a/fs/cifs/smb2file.c b/fs/cifs/smb2file.c
>> > > index f5dcc4940b6d..82887064569a 100644
>> > > --- a/fs/cifs/smb2file.c
>> > > +++ b/fs/cifs/smb2file.c
>> > > @@ -11,7 +11,7 @@
>> > > #include <linux/slab.h>
>> > > #include <linux/pagemap.h>
>> > > #include <asm/div64.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
>> > > index 8571a459c710..66b2d03ea231 100644
>> > > --- a/fs/cifs/smb2inode.c
>> > > +++ b/fs/cifs/smb2inode.c
>> > > @@ -12,7 +12,7 @@
>> > > #include <linux/slab.h>
>> > > #include <linux/pagemap.h>
>> > > #include <asm/div64.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
>> > > index 82dd2e973753..012b8b8a96ba 100644
>> > > --- a/fs/cifs/smb2ops.c
>> > > +++ b/fs/cifs/smb2ops.c
>> > > @@ -14,7 +14,7 @@
>> > > #include <crypto/aead.h>
>> > > #include <linux/fiemap.h>
>> > > #include <uapi/linux/magic.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifsglob.h"
>> > > #include "smb2pdu.h"
>> > > #include "smb2proto.h"
>> > > @@ -379,7 +379,7 @@ smb2_find_dequeue_mid(struct TCP_Server_Info *server, char *buf)
>> > > static void
>> > > smb2_dump_detail(void *buf, struct TCP_Server_Info *server)
>> > > {
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
>> > >
>> > > cifs_server_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Mid: %llu Pid: %d\n",
>> > > @@ -437,7 +437,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
>> > > /* start with specified wsize, or default */
>> > > wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
>> > > wsize = min_t(unsigned int, wsize, server->max_write);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (server->rdma) {
>> > > if (server->sign)
>> > > /*
>> > > @@ -485,7 +485,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
>> > > /* start with specified rsize, or default */
>> > > rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
>> > > rsize = min_t(unsigned int, rsize, server->max_read);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (server->rdma) {
>> > > if (server->sign)
>> > > /*
>> > > @@ -930,7 +930,7 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
>> > > o_rsp = (struct smb2_create_rsp *)rsp_iov[0].iov_base;
>> > > oparms.fid->persistent_fid = o_rsp->PersistentFileId;
>> > > oparms.fid->volatile_fid = o_rsp->VolatileFileId;
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > oparms.fid->mid = le64_to_cpu(o_rsp->hdr.MessageId);
>> > > #endif /* CIFS_DEBUG2 */
>> > >
>> > > @@ -1132,7 +1132,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > static ssize_t
>> > > move_smb2_ea_to_cifs(char *dst, size_t dst_size,
>> > > struct smb2_file_full_ea_info *src, size_t src_size,
>> > > @@ -1544,7 +1544,7 @@ smb2_set_fid(struct cifsFileInfo *cfile, struct cifs_fid *fid, __u32 oplock)
>> > > cfile->fid.persistent_fid = fid->persistent_fid;
>> > > cfile->fid.volatile_fid = fid->volatile_fid;
>> > > cfile->fid.access = fid->access;
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > cfile->fid.mid = fid->mid;
>> > > #endif /* CIFS_DEBUG2 */
>> > > server->ops->set_oplock_level(cinode, oplock, fid->epoch,
>> > > @@ -4352,7 +4352,7 @@ smb3_set_oplock_level(struct cifsInodeInfo *cinode, __u32 oplock,
>> > > }
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > static bool
>> > > smb2_is_read_op(__u32 oplock)
>> > > {
>> > > @@ -4941,7 +4941,7 @@ handle_read_data(struct TCP_Server_Info *server, struct mid_q_entry *mid,
>> > > }
>> > >
>> > > data_offset = server->ops->read_data_offset(buf);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > use_rdma_mr = rdata->mr;
>> > > #endif
>> > > data_len = server->ops->read_data_length(buf, use_rdma_mr);
>> > > @@ -5073,7 +5073,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
>> > > dw->ppages, dw->npages, dw->len,
>> > > true);
>> > > if (rc >= 0) {
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > mid->when_received = jiffies;
>> > > #endif
>> > > if (dw->server->ops->is_network_name_deleted)
>> > > @@ -5460,7 +5460,7 @@ smb2_make_node(unsigned int xid, struct inode *inode,
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > struct smb_version_operations smb20_operations = {
>> > > .compare_fids = smb2_compare_fids,
>> > > .setup_request = smb2_setup_request,
>> > > @@ -5544,7 +5544,7 @@ struct smb_version_operations smb20_operations = {
>> > > .dir_needs_close = smb2_dir_needs_close,
>> > > .get_dfs_refer = smb2_get_dfs_refer,
>> > > .select_sectype = smb2_select_sectype,
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > .query_all_EAs = smb2_query_eas,
>> > > .set_EA = smb2_set_ea,
>> > > #endif /* CIFS_XATTR */
>> > > @@ -5647,7 +5647,7 @@ struct smb_version_operations smb21_operations = {
>> > > .notify = smb3_notify,
>> > > .get_dfs_refer = smb2_get_dfs_refer,
>> > > .select_sectype = smb2_select_sectype,
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > .query_all_EAs = smb2_query_eas,
>> > > .set_EA = smb2_set_ea,
>> > > #endif /* CIFS_XATTR */
>> > > @@ -5761,7 +5761,7 @@ struct smb_version_operations smb30_operations = {
>> > > .receive_transform = smb3_receive_transform,
>> > > .get_dfs_refer = smb2_get_dfs_refer,
>> > > .select_sectype = smb2_select_sectype,
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > .query_all_EAs = smb2_query_eas,
>> > > .set_EA = smb2_set_ea,
>> > > #endif /* CIFS_XATTR */
>> > > @@ -5875,7 +5875,7 @@ struct smb_version_operations smb311_operations = {
>> > > .receive_transform = smb3_receive_transform,
>> > > .get_dfs_refer = smb2_get_dfs_refer,
>> > > .select_sectype = smb2_select_sectype,
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > .query_all_EAs = smb2_query_eas,
>> > > .set_EA = smb2_set_ea,
>> > > #endif /* CIFS_XATTR */
>> > > @@ -5891,7 +5891,7 @@ struct smb_version_operations smb311_operations = {
>> > > .is_network_name_deleted = smb2_is_network_name_deleted,
>> > > };
>> > >
>> > > -#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
>> > > +#ifdef CONFIG_SMBFS_ALLOW_INSECURE_LEGACY
>> > > struct smb_version_values smb20_values = {
>> > > .version_string = SMB20_VERSION_STRING,
>> > > .protocol_id = SMB20_PROT_ID,
>> > > diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
>> > > index 131bec79d6fd..86decb4642aa 100644
>> > > --- a/fs/cifs/smb2pdu.c
>> > > +++ b/fs/cifs/smb2pdu.c
>> > > @@ -36,7 +36,7 @@
>> > > #include "cifs_spnego.h"
>> > > #include "smbdirect.h"
>> > > #include "trace.h"
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > #include "dfs_cache.h"
>> > > #endif
>> > >
>> > > @@ -1319,7 +1319,7 @@ SMB2_sess_alloc_buffer(struct SMB2_sess_data *sess_data)
>> > > else
>> > > req->SecurityMode = 0;
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
>> > > #else
>> > > req->Capabilities = 0;
>> > > @@ -1402,7 +1402,7 @@ SMB2_sess_establish_session(struct SMB2_sess_data *sess_data)
>> > > return rc;
>> > > }
>> > >
>> > > -#ifdef CONFIG_CIFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_UPCALL
>> > > static void
>> > > SMB2_auth_kerberos(struct SMB2_sess_data *sess_data)
>> > > {
>> > > @@ -1638,7 +1638,7 @@ SMB2_sess_auth_rawntlmssp_authenticate(struct SMB2_sess_data *sess_data)
>> > > }
>> > >
>> > > rc = SMB2_sess_establish_session(sess_data);
>> > > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
>> > > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
>> > > if (ses->server->dialect < SMB30_PROT_ID) {
>> > > cifs_dbg(VFS, "%s: dumping generated SMB2 session keys\n", __func__);
>> > > /*
>> > > @@ -3026,7 +3026,7 @@ SMB2_open(const unsigned int xid, struct cifs_open_parms *oparms, __le16 *path,
>> > > oparms->fid->persistent_fid = rsp->PersistentFileId;
>> > > oparms->fid->volatile_fid = rsp->VolatileFileId;
>> > > oparms->fid->access = oparms->desired_access;
>> > > -#ifdef CONFIG_CIFS_DEBUG2
>> > > +#ifdef CONFIG_SMBFS_DEBUG2
>> > > oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
>> > > #endif /* CIFS_DEBUG2 */
>> > >
>> > > @@ -4057,7 +4057,7 @@ smb2_new_read_req(void **buf, unsigned int *total_len,
>> > > io_parms->persistent_fid,
>> > > io_parms->tcon->tid, io_parms->tcon->ses->Suid,
>> > > io_parms->offset, io_parms->length);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > /*
>> > > * If we want to do a RDMA write, fill in and append
>> > > * smbd_buffer_descriptor_v1 to the end of read request
>> > > @@ -4177,7 +4177,7 @@ smb2_readv_callback(struct mid_q_entry *mid)
>> > > default:
>> > > rdata->result = -EIO;
>> > > }
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > /*
>> > > * If this rdata has a memmory registered, the MR can be freed
>> > > * MR needs to be freed as soon as I/O finishes to prevent deadlock
>> > > @@ -4411,7 +4411,7 @@ smb2_writev_callback(struct mid_q_entry *mid)
>> > > wdata->result = -EIO;
>> > > break;
>> > > }
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > /*
>> > > * If this wdata has a memory registered, the MR can be freed
>> > > * The number of MRs available is limited, it's important to recover
>> > > @@ -4484,7 +4484,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
>> > >
>> > > trace_smb3_write_enter(0 /* xid */, wdata->cfile->fid.persistent_fid,
>> > > tcon->tid, tcon->ses->Suid, wdata->offset, wdata->bytes);
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > /*
>> > > * If we want to do a server RDMA read, fill in and append
>> > > * smbd_buffer_descriptor_v1 to the end of write request
>> > > @@ -4536,7 +4536,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
>> > > rqst.rq_npages = wdata->nr_pages;
>> > > rqst.rq_pagesz = wdata->pagesz;
>> > > rqst.rq_tailsz = wdata->tailsz;
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > if (wdata->mr) {
>> > > iov[0].iov_len += sizeof(struct smbd_buffer_descriptor_v1);
>> > > rqst.rq_npages = 0;
>> > > @@ -4545,7 +4545,7 @@ smb2_async_writev(struct cifs_writedata *wdata,
>> > > cifs_dbg(FYI, "async write at %llu %u bytes\n",
>> > > wdata->offset, wdata->bytes);
>> > >
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > /* For RDMA read, I/O size is in RemainingBytes not in Length */
>> > > if (!wdata->mr)
>> > > req->Length = cpu_to_le32(wdata->bytes);
>> > > diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c
>> > > index f64922f340b3..00313a488e6f 100644
>> > > --- a/fs/cifs/smb2transport.c
>> > > +++ b/fs/cifs/smb2transport.c
>> > > @@ -454,7 +454,7 @@ generate_smb3signingkey(struct cifs_ses *ses,
>> > > if (rc)
>> > > return rc;
>> > >
>> > > -#ifdef CONFIG_CIFS_DEBUG_DUMP_KEYS
>> > > +#ifdef CONFIG_SMBFS_DEBUG_DUMP_KEYS
>> > > cifs_dbg(VFS, "%s: dumping generated AES session keys\n", __func__);
>> > > /*
>> > > * The session id is opaque in terms of endianness, so we can't
>> > > diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
>> > > index a87fca82a796..922344c8d5c1 100644
>> > > --- a/fs/cifs/smbdirect.h
>> > > +++ b/fs/cifs/smbdirect.h
>> > > @@ -7,7 +7,7 @@
>> > > #ifndef _SMBDIRECT_H
>> > > #define _SMBDIRECT_H
>> > >
>> > > -#ifdef CONFIG_CIFS_SMB_DIRECT
>> > > +#ifdef CONFIG_SMBFS_SMB_DIRECT
>> > > #define cifs_rdma_enabled(server) ((server)->rdma)
>> > >
>> > > #include "cifsglob.h"
>> > > diff --git a/fs/cifs/cifsfs.h b/fs/cifs/smbfs.h
>> > > similarity index 97%
>> > > rename from fs/cifs/cifsfs.h
>> > > rename to fs/cifs/smbfs.h
>> > > index 81f4c15936d0..d067be5d3184 100644
>> > > --- a/fs/cifs/cifsfs.h
>> > > +++ b/fs/cifs/smbfs.h
>> > > @@ -115,7 +115,7 @@ extern int cifs_readdir(struct file *file, struct dir_context *ctx);
>> > > extern const struct dentry_operations cifs_dentry_ops;
>> > > extern const struct dentry_operations cifs_ci_dentry_ops;
>> > >
>> > > -#ifdef CONFIG_CIFS_DFS_UPCALL
>> > > +#ifdef CONFIG_SMBFS_DFS_UPCALL
>> > > extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
>> > > #else
>> > > #define cifs_dfs_d_automount NULL
>> > > @@ -127,12 +127,12 @@ extern const char *cifs_get_link(struct dentry *, struct inode *,
>> > > extern int cifs_symlink(struct user_namespace *mnt_userns, struct inode *inode,
>> > > struct dentry *direntry, const char *symname);
>> > >
>> > > -#ifdef CONFIG_CIFS_XATTR
>> > > +#ifdef CONFIG_SMBFS_XATTR
>> > > extern const struct xattr_handler *cifs_xattr_handlers[];
>> > > extern ssize_t cifs_listxattr(struct dentry *, char *, size_t);
>> > > #else
>> > > -# define cifs_xattr_handlers NULL
>> > > -# define cifs_listxattr NULL
>> > > +#define cifs_xattr_handlers NULL
>> > > +#define cifs_listxattr NULL
>> > > #endif
>> > >
>> > > extern ssize_t cifs_file_copychunk_range(unsigned int xid,
>> > > @@ -148,9 +148,9 @@ struct smb3_fs_context;
>> > > extern struct dentry *cifs_smb3_do_mount(struct file_system_type *fs_type,
>> > > int flags, struct smb3_fs_context *ctx);
>> > >
>> > > -#ifdef CONFIG_CIFS_NFSD_EXPORT
>> > > +#ifdef CONFIG_SMBFS_NFSD_EXPORT
>> > > extern const struct export_operations cifs_export_ops;
>> > > -#endif /* CONFIG_CIFS_NFSD_EXPORT */
>> > > +#endif /* CONFIG_SMBFS_NFSD_EXPORT */
>> > >
>> > > /* when changing internal version - update following two lines at same time */
>> > > #define SMB3_PRODUCT_BUILD 38
>> > > diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
>> > > index 160463e22c95..cd689b47d0d9 100644
>> > > --- a/fs/cifs/transport.c
>> > > +++ b/fs/cifs/transport.c
>> > > @@ -77,7 +77,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
>> > > {
>> > > struct mid_q_entry *midEntry =
>> > > container_of(refcount, struct mid_q_entry, refcount);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > __le16 command = midEntry->server->vals->lock_cmd;
>> > > __u16 smb_cmd = le16_to_cpu(midEntry->command);
>> > > unsigned long now;
>> > > @@ -96,7 +96,7 @@ static void _cifs_mid_q_entry_release(struct kref *refcount)
>> > > cifs_buf_release(midEntry->resp_buf);
>> > > else
>> > > cifs_small_buf_release(midEntry->resp_buf);
>> > > -#ifdef CONFIG_CIFS_STATS2
>> > > +#ifdef CONFIG_SMBFS_STATS2
>> > > now = jiffies;
>> > > if (now < midEntry->when_alloc)
>> > > cifs_server_dbg(VFS, "Invalid mid allocation time\n");
>> > > diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
>> > > index 9d486fbbfbbd..bce40126e1a9 100644
>> > > --- a/fs/cifs/xattr.c
>> > > +++ b/fs/cifs/xattr.c
>> > > @@ -10,7 +10,7 @@
>> > > #include <linux/posix_acl_xattr.h>
>> > > #include <linux/slab.h>
>> > > #include <linux/xattr.h>
>> > > -#include "cifsfs.h"
>> > > +#include "smbfs.h"
>> > > #include "cifspdu.h"
>> > > #include "cifsglob.h"
>> > > #include "cifsproto.h"
>> > > @@ -202,7 +202,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
>> > > }
>> > >
>> > > case XATTR_ACL_ACCESS:
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > if (!value)
>> > > goto out;
>> > > if (sb->s_flags & SB_POSIXACL)
>> > > @@ -210,11 +210,11 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
>> > > value, (const int)size,
>> > > ACL_TYPE_ACCESS, cifs_sb->local_nls,
>> > > cifs_remap(cifs_sb));
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > > break;
>> > >
>> > > case XATTR_ACL_DEFAULT:
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > if (!value)
>> > > goto out;
>> > > if (sb->s_flags & SB_POSIXACL)
>> > > @@ -222,7 +222,7 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
>> > > value, (const int)size,
>> > > ACL_TYPE_DEFAULT, cifs_sb->local_nls,
>> > > cifs_remap(cifs_sb));
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > > break;
>> > > }
>> > >
>> > > @@ -366,23 +366,23 @@ static int cifs_xattr_get(const struct xattr_handler *handler,
>> > > }
>> > >
>> > > case XATTR_ACL_ACCESS:
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > if (sb->s_flags & SB_POSIXACL)
>> > > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
>> > > value, size, ACL_TYPE_ACCESS,
>> > > cifs_sb->local_nls,
>> > > cifs_remap(cifs_sb));
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > > break;
>> > >
>> > > case XATTR_ACL_DEFAULT:
>> > > -#ifdef CONFIG_CIFS_POSIX
>> > > +#ifdef CONFIG_SMBFS_POSIX
>> > > if (sb->s_flags & SB_POSIXACL)
>> > > rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
>> > > value, size, ACL_TYPE_DEFAULT,
>> > > cifs_sb->local_nls,
>> > > cifs_remap(cifs_sb));
>> > > -#endif /* CONFIG_CIFS_POSIX */
>> > > +#endif /* CONFIG_SMBFS_POSIX */
>> > > break;
>> > > }
>> > >
>> > > --
>> > > 2.35.3
>> > >
>> >
>> >
>> > --
>> > Thanks,
>> >
>> > Steve
>>
>>
>>
>> --
>> Thanks,
>>
>> Steve
>
>
>
>--
>Thanks,
>
>Steve
>