]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: when insecure legacy is disabled shrink amount of SMB1 code
authorSteve French <stfrench@microsoft.com>
Mon, 1 Aug 2022 16:17:46 +0000 (11:17 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 5 Aug 2022 16:24:03 +0000 (11:24 -0500)
commitfb157ed226d225b6a149ed63a7831f6bdde7b911
tree939b77f3493e539c09be580e54300bdd2553fc17
parent97b82c07c4217260e448ef774e6099abf608bd1d
cifs: when insecure legacy is disabled shrink amount of SMB1 code

Currently much of the smb1 code is built even when
CONFIG_CIFS_ALLOW_INSECURE_LEGACY is disabled.

Move cifssmb.c to only be compiled when insecure legacy is disabled,
and move various SMB1/CIFS helper functions to that ifdef.  Some
functions that were not SMB1/CIFS specific needed to be moved out of
cifssmb.c

This shrinks cifs.ko by more than 10% which is good - but also will
help with the eventual movement of the legacy code to a distinct
module.  Follow on patches can shrink the number of ifdefs by
code restructuring where smb1 code is wedged in functions that
should be calling dialect specific helper functions instead,
and also by moving some functions from file.c/dir.c/inode.c into
smb1 specific c files.

Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
13 files changed:
fs/cifs/Makefile
fs/cifs/cifsacl.c
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/file.c
fs/cifs/inode.c
fs/cifs/ioctl.c
fs/cifs/link.c
fs/cifs/sess.c
fs/cifs/transport.c
fs/cifs/xattr.c