smb3: fix problem with null cifs super block with previous patch
authorSteve French <stfrench@microsoft.com>
Tue, 4 Feb 2020 19:02:59 +0000 (13:02 -0600)
committerSteve French <stfrench@microsoft.com>
Wed, 5 Feb 2020 12:32:19 +0000 (06:32 -0600)
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>
fs/cifs/cifsproto.h
fs/cifs/smb2ops.c

index 748bd00..89eaaf4 100644 (file)
@@ -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;
index 33bb86c..ac6628e 100644 (file)
@@ -2407,7 +2407,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
                                      FS_FULL_SIZE_INFORMATION,
                                      SMB2_O_INFO_FILESYSTEM,
                                      sizeof(struct smb2_fs_full_size_info),
-                                     &rsp_iov, &buftype, NULL);
+                                     &rsp_iov, &buftype, cifs_sb);
        if (rc)
                goto qfs_exit;