diff options
Diffstat (limited to 'fs/smb/client/smb2ops.c')
-rw-r--r-- | fs/smb/client/smb2ops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 02543b0d4473..28e79d2da652 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -2339,6 +2339,14 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon, struct TCP_Server_Info *server; int retries = 0, cur_sleep = 1; + pr_err("%s: %s first query\n", __func__, (search_flags & CIFS_SEARCH_CACHED_FID) ? "cached" : "remote"); + if (search_flags & CIFS_SEARCH_CACHED_FID) { + srch_inf->entries_in_buffer = 0; + srch_inf->index_of_last_entry = 2; + + return SMB2_query_directory(xid, tcon, fid->persistent_fid, fid->volatile_fid, 0, srch_inf); + } + replay_again: /* reinitialize for possible replay */ flags = 0; @@ -2463,6 +2471,7 @@ smb2_query_dir_next(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_fid *fid, __u16 search_flags, struct cifs_search_info *srch_inf) { + pr_err("%s: %s next query\n", __func__, (search_flags & CIFS_SEARCH_CACHED_FID) ? "cached" : "remote"); return SMB2_query_directory(xid, tcon, fid->persistent_fid, fid->volatile_fid, 0, srch_inf); } |