@@ -1166,9 +1166,7 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
cifs_dbg(FYI, "fce error %d\n", rc);
goto rddir2_exit;
}
- if (current_entry != NULL) {
- cifs_dbg(FYI, "entry %lld found\n", ctx->pos);
- } else {
+ if (current_entry == NULL) {
if (cfid) {
mutex_lock(&cfid->dirents.de_mutex);
finished_cached_dirents_count(&cfid->dirents, ctx);
@@ -1177,6 +1175,7 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
cifs_dbg(FYI, "Could not find entry\n");
goto rddir2_exit;
}
+ cifs_dbg(FYI, "entry %lld found\n", ctx->pos);
cifs_dbg(FYI, "loop through %d times filling dir for net buf %p\n",
num_to_fill, cifsFile->srch_inf.ntwrk_buf_start);
max_len = tcon->ses->server->ops->calc_smb_size(
Use the fact that we use "goto" in the else-branch, this avoids an indentation level for the success case. Signed-off-by: Volker Lendecke <vl@samba.org> --- fs/cifs/readdir.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)