+1
−2
Loading
The newly introduced variable is initialized in an #ifdef block
but used outside of it, leading to undefined behavior when
CONFIG_CIFS_ALLOW_INSECURE_LEGACY is disabled:
fs/smb/client/dir.c:417:9: error: variable 'sbflags' is uninitialized when used here [-Werror,-Wuninitialized]
417 | if (sbflags & CIFS_MOUNT_DYNPERM)
| ^~~~~~~
Move the initialization into the declaration, the same way as the
other similar function do it.
Fixes: 4fc3a433 ("smb: client: use atomic_t for mnt_cifs_flags")
Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
Reviewed-by:
Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by:
Steve French <stfrench@microsoft.com>