summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2misc.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2022-05-21 23:56:16 -0500
committerSteve French <stfrench@microsoft.com>2022-05-21 23:56:16 -0500
commitfb253d5ba3fcbd3b4216bcc37d019926f5e32ebb (patch)
treebf869c69939bcd87dfddd165d3ece529367dddd3 /fs/cifs/smb2misc.c
parentfb64f7f1057e5eb6fbf3b06f92d1cd80ad7f9998 (diff)
downloadlwn-fb253d5ba3fcbd3b4216bcc37d019926f5e32ebb.tar.gz
lwn-fb253d5ba3fcbd3b4216bcc37d019926f5e32ebb.zip
smb3: add trace point for lease not found issue
When trying to debug problems with server sending us a lease we don't recognize, it would be helpful to have a dynamic trace point for this case. New tracepoint is called trace_smb3_lease_not_found Acked-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r--fs/cifs/smb2misc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 15b5d2565e79..f236beaff96d 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -656,6 +656,12 @@ smb2_is_valid_lease_break(char *buffer)
}
spin_unlock(&cifs_tcp_ses_lock);
cifs_dbg(FYI, "Can not process lease break - no lease matched\n");
+ trace_smb3_lease_not_found(le32_to_cpu(rsp->CurrentLeaseState),
+ le32_to_cpu(rsp->hdr.Id.SyncId.TreeId),
+ le64_to_cpu(rsp->hdr.SessionId),
+ *((u64 *)rsp->LeaseKey),
+ *((u64 *)&rsp->LeaseKey[8]));
+
return false;
}