]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commitb7fd0fa0eac701b5eab07d3994a2973801035c0b
tree2565c590aad6440a8dc7e6e367e88c8acc6f6075
parentbb9cad1b49e3123fd7691236be318d4a14e206fe
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