summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-02-04 20:02:59 +0100
committerSteve French <stfrench@microsoft.com>2020-02-05 13:32:19 +0100
commit87f93d82e0952da18af4d978e7d887b4c5326c0b (patch)
treea72e97199d9fbad3c709c34bd33dcffc9292e86b /fs/cifs/cifsproto.h
parentSMB3: Backup intent flag missing from some more ops (diff)
downloadlinux-87f93d82e0952da18af4d978e7d887b4c5326c0b.tar.xz
linux-87f93d82e0952da18af4d978e7d887b4c5326c0b.zip
smb3: fix problem with null cifs super block with previous patch
Add check for null cifs_sb to create_options helper Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 748bd00cb5f1..89eaaf46d1ca 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -614,7 +614,7 @@ static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
static inline int cifs_create_options(struct cifs_sb_info *cifs_sb, int options)
{
- if (backup_cred(cifs_sb))
+ if (cifs_sb && (backup_cred(cifs_sb)))
return options | CREATE_OPEN_BACKUP_INTENT;
else
return options;