Skip to content

Commit 87f93d8

Browse files
committed
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 <[email protected]> Reviewed-by: Amir Goldstein <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]>
1 parent 0f06093 commit 87f93d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/cifs/cifsproto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,
614614

615615
static inline int cifs_create_options(struct cifs_sb_info *cifs_sb, int options)
616616
{
617-
if (backup_cred(cifs_sb))
617+
if (cifs_sb && (backup_cred(cifs_sb)))
618618
return options | CREATE_OPEN_BACKUP_INTENT;
619619
else
620620
return options;

fs/cifs/smb2ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ smb2_queryfs(const unsigned int xid, struct cifs_tcon *tcon,
24072407
FS_FULL_SIZE_INFORMATION,
24082408
SMB2_O_INFO_FILESYSTEM,
24092409
sizeof(struct smb2_fs_full_size_info),
2410-
&rsp_iov, &buftype, NULL);
2410+
&rsp_iov, &buftype, cifs_sb);
24112411
if (rc)
24122412
goto qfs_exit;
24132413

0 commit comments

Comments
 (0)