Skip to content

Commit 63ba840

Browse files
piastrygregkh
authored andcommitted
CIFS: Improve readdir verbosity
commit dcd87838c06f05ab7650b249ebf0d5b57ae63e1e upstream. Downgrade the loglevel for SMB2 to prevent filling the log with messages if e.g. readdir was interrupted. Also make SMB2 and SMB1 codepaths do the same logging during readdir. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 824b950 commit 63ba840

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

fs/cifs/smb1ops.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,13 @@ cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
849849
struct cifs_fid *fid, __u16 search_flags,
850850
struct cifs_search_info *srch_inf)
851851
{
852-
return CIFSFindFirst(xid, tcon, path, cifs_sb,
853-
&fid->netfid, search_flags, srch_inf, true);
852+
int rc;
853+
854+
rc = CIFSFindFirst(xid, tcon, path, cifs_sb,
855+
&fid->netfid, search_flags, srch_inf, true);
856+
if (rc)
857+
cifs_dbg(FYI, "find first failed=%d\n", rc);
858+
return rc;
854859
}
855860

856861
static int

fs/cifs/smb2ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
909909
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL);
910910
kfree(utf16_path);
911911
if (rc) {
912-
cifs_dbg(VFS, "open dir failed\n");
912+
cifs_dbg(FYI, "open dir failed rc=%d\n", rc);
913913
return rc;
914914
}
915915

@@ -919,7 +919,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
919919
rc = SMB2_query_directory(xid, tcon, fid->persistent_fid,
920920
fid->volatile_fid, 0, srch_inf);
921921
if (rc) {
922-
cifs_dbg(VFS, "query directory failed\n");
922+
cifs_dbg(FYI, "query directory failed rc=%d\n", rc);
923923
SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid);
924924
}
925925
return rc;

0 commit comments

Comments
 (0)