]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: simplify SWN code with dummy funcs instead of ifdefs
authorAurelien Aptel <aaptel@suse.com>
Fri, 9 Apr 2021 14:31:37 +0000 (16:31 +0200)
committerSteve French <stfrench@microsoft.com>
Tue, 13 Apr 2021 04:51:09 +0000 (23:51 -0500)
commitca02880a2559b61e6cc1e88c104a3eaf42c5cfef
tree34edf79005c18be1aee6eb05018ce25ef399c94f
parenta465babd263c95e3a81121383181400859c3b1b8
cifs: simplify SWN code with dummy funcs instead of ifdefs

This commit doesn't change the logic of SWN.

Add dummy implementation of SWN functions when SWN is disabled instead
of using ifdef sections.

The dummy functions get optimized out, this leads to clearer code and
compile time type-checking regardless of config options with no
runtime penalty.

Leave the simple ifdefs section as-is.

A single bitfield (bool foo:1) on its own will use up one int. Move
tcon->use_witness out of ifdefs with the other tcon bitfields.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Samuel Cabrero <scabrero@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_debug.c
fs/cifs/cifs_swn.h
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/connect.c