diff mbox series

cifs: add a break after finding a new iface

Message ID 20220310113709.739102-1-wanjiabing@vivo.com (mailing list archive)
State New, archived
Headers show
Series cifs: add a break after finding a new iface | expand

Commit Message

Jiabing Wan March 10, 2022, 11:37 a.m. UTC
There should be a break after finding a new iface, otherwise the iface
would always be the head of the list after iterating.

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
 fs/cifs/sess.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index fef087129c21..7802525a52ec 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -253,6 +253,7 @@  cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
 			continue;
 		}
 		kref_get(&iface->refcount);
+		break;
 	}
 
 	if (!iface) {