summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2misc.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2022-05-22 00:41:41 -0500
committerSteve French <stfrench@microsoft.com>2022-05-22 00:46:08 -0500
commit35a2b533a261e2e43542df902bd9757a1deebfd5 (patch)
tree8c5f21f25f53651ca6181ad0f173f27441327286 /fs/cifs/smb2misc.c
parent2b058acecf56f6b8fac781911a683219b9ca3b7b (diff)
downloadlwn-35a2b533a261e2e43542df902bd9757a1deebfd5.tar.gz
lwn-35a2b533a261e2e43542df902bd9757a1deebfd5.zip
smb3: add trace point for oplock not found
In order to debug problems with server potentially sending us an oplock that we don't recognize (or a race with close and oplock break) it would be helpful to have a dynamic trace point for this case. New tracepoint is called trace_smb3_oplock_not_found Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r--fs/cifs/smb2misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index f236beaff96d..17813c3d0c6e 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -732,6 +732,10 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
}
spin_unlock(&cifs_tcp_ses_lock);
cifs_dbg(FYI, "No file id matched, oplock break ignored\n");
+ trace_smb3_oplock_not_found(0 /* no xid */, rsp->PersistentFid,
+ le32_to_cpu(rsp->hdr.Id.SyncId.TreeId),
+ le64_to_cpu(rsp->hdr.SessionId));
+
return true;
}