smb3: add missing read completion trace point
authorSteve French <stfrench@microsoft.com>
Mon, 25 Feb 2019 21:02:58 +0000 (15:02 -0600)
committerSteve French <stfrench@microsoft.com>
Wed, 6 Mar 2019 00:10:04 +0000 (18:10 -0600)
When ENODATA returned we weren't logging the read completion
(not an error, but can be indicated by logging length 0) which
makes looking at read traces confusing for smb3.

Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
fs/cifs/smb2pdu.c

index ec9abe2..b774b43 100644 (file)
@@ -3404,7 +3404,10 @@ SMB2_read(const unsigned int xid, struct cifs_io_parms *io_parms,
                                            io_parms->tcon->tid, ses->Suid,
                                            io_parms->offset, io_parms->length,
                                            rc);
-               }
+               } else
+                       trace_smb3_read_done(xid, req->PersistentFileId,
+                                   io_parms->tcon->tid, ses->Suid,
+                                   io_parms->offset, 0);
                free_rsp_buf(resp_buftype, rsp_iov.iov_base);
                return rc == -ENODATA ? 0 : rc;
        } else