Skip to content

Commit 387ba9b

Browse files
committed
cifs: do not build smb1ops if legacy support is disabled
We should not be including unused SMB1/CIFS functions when legacy support is disabled (CONFIG_CIFS_ALLOW_INSECURE_LEGACY turned off), but especially obvious is not needing to build smb1ops.c at all when legacy support is disabled. Over time we can move more SMB1/CIFS and SMB2.0 legacy functions into ifdefs but this is a good start (and shrinks the module size a few percent). Reviewed-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent cc391b6 commit 387ba9b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/cifs/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ obj-$(CONFIG_CIFS) += cifs.o
88
cifs-y := trace.o cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o \
99
inode.o link.o misc.o netmisc.o smbencrypt.o transport.o \
1010
cifs_unicode.o nterr.o cifsencrypt.o \
11-
readdir.o ioctl.o sess.o export.o smb1ops.o unc.o winucase.o \
11+
readdir.o ioctl.o sess.o export.o unc.o winucase.o \
1212
smb2ops.o smb2maperror.o smb2transport.o \
1313
smb2misc.o smb2pdu.o smb2inode.o smb2file.o cifsacl.o fs_context.o \
1414
dns_resolve.o cifs_spnego_negtokeninit.asn1.o asn1.o
@@ -30,3 +30,5 @@ cifs-$(CONFIG_CIFS_FSCACHE) += fscache.o
3030
cifs-$(CONFIG_CIFS_SMB_DIRECT) += smbdirect.o
3131

3232
cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
33+
34+
cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += smb1ops.o

0 commit comments

Comments
 (0)