summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2021-04-09 17:31:37 +0300
committerSteve French <stfrench@microsoft.com>2021-04-26 00:28:22 +0300
commitb7fd0fa0eac701b5eab07d3994a2973801035c0b (patch)
tree2565c590aad6440a8dc7e6e367e88c8acc6f6075 /fs/cifs/cifsfs.c
parentbb9cad1b49e3123fd7691236be318d4a14e206fe (diff)
downloadlinux-b7fd0fa0eac701b5eab07d3994a2973801035c0b.tar.xz
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>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 5ddd20b62484..1b65ff9e9189 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -656,10 +656,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
seq_printf(s, ",multichannel,max_channels=%zu",
tcon->ses->chan_max);
-#ifdef CONFIG_CIFS_SWN_UPCALL
if (tcon->use_witness)
seq_puts(s, ",witness");
-#endif
return 0;
}