diff options
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r-- | fs/cifs/smb2pdu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index eba0efde66d7..edccb5252462 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -687,6 +687,10 @@ SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) | |||
687 | else | 687 | else |
688 | return -EIO; | 688 | return -EIO; |
689 | 689 | ||
690 | /* no need to send SMB logoff if uid already closed due to reconnect */ | ||
691 | if (ses->need_reconnect) | ||
692 | goto smb2_session_already_dead; | ||
693 | |||
690 | rc = small_smb2_init(SMB2_LOGOFF, NULL, (void **) &req); | 694 | rc = small_smb2_init(SMB2_LOGOFF, NULL, (void **) &req); |
691 | if (rc) | 695 | if (rc) |
692 | return rc; | 696 | return rc; |
@@ -701,6 +705,8 @@ SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) | |||
701 | * No tcon so can't do | 705 | * No tcon so can't do |
702 | * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); | 706 | * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); |
703 | */ | 707 | */ |
708 | |||
709 | smb2_session_already_dead: | ||
704 | return rc; | 710 | return rc; |
705 | } | 711 | } |
706 | 712 | ||