[PATCH 04/10] cifs: Slightly simplify cifs_readdir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 fs/cifs/readdir.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 7dfa33b6954f..0bca6dc10093 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -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(
-- 
2.30.2




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux