Commit 87f93d82 authored by Steve French's avatar Steve French

smb3: fix problem with null cifs super block with previous patch

Add check for null cifs_sb to create_options helper
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarAmir Goldstein <amir73il@gmail.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
parent 0f060936
...@@ -614,7 +614,7 @@ static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses, ...@@ -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) 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; return options | CREATE_OPEN_BACKUP_INTENT;
else else
return options; return options;
......
...@@ -2407,7 +2407,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon, ...@@ -2407,7 +2407,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
FS_FULL_SIZE_INFORMATION, FS_FULL_SIZE_INFORMATION,
SMB2_O_INFO_FILESYSTEM, SMB2_O_INFO_FILESYSTEM,
sizeof(struct smb2_fs_full_size_info), sizeof(struct smb2_fs_full_size_info),
&rsp_iov, &buftype, NULL); &rsp_iov, &buftype, cifs_sb);
if (rc) if (rc)
goto qfs_exit; goto qfs_exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment