]> git.baikalelectronics.ru Git - kernel.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>
Sun, 25 Apr 2021 21:28:22 +0000 (16:28 -0500)
commitc0a807a44b89ecbdc852168e45d20d3e80e5d905
tree2565c590aad6440a8dc7e6e367e88c8acc6f6075
parent2394959e5589bbf48fab61d2b88dfe1c839594dd
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