diff mbox series

[03/10] cifs: Slightly simplify cifs_readdir()

Message ID 468ae3a579bb44fca13113680fecfd550e36b055.1678885349.git.vl@samba.org (mailing list archive)
State New, archived
Headers show
Series Some cleanups for fs/cifs | expand

Commit Message

Volker Lendecke March 15, 2023, 1:05 p.m. UTC
"else" not needed, we do a "goto" in the if-branch. This makes the
following condition a bit easier to read for me.

Signed-off-by: Volker Lendecke <vl@samba.org>
---
 fs/cifs/readdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index ef638086d734..7dfa33b6954f 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -1165,7 +1165,8 @@  int cifs_readdir(struct file *file, struct dir_context *ctx)
 	if (rc) {
 		cifs_dbg(FYI, "fce error %d\n", rc);
 		goto rddir2_exit;
-	} else if (current_entry != NULL) {
+	}
+	if (current_entry != NULL) {
 		cifs_dbg(FYI, "entry %lld found\n", ctx->pos);
 	} else {
 		if (cfid) {