summaryrefslogtreecommitdiff
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2022-07-22 20:02:59 +0300
committerSteve French <stfrench@microsoft.com>2022-08-01 09:34:44 +0300
commit9543c8ab3016cefa6abb265234a7ef0ca2b3f89f (patch)
tree10f0cf703a5edbc9e847e88e63efc161ca479822 /fs/cifs/connect.c
parentec88cc57c39eef7f630a0f118955f3c16dc55a45 (diff)
downloadlinux-9543c8ab3016cefa6abb265234a7ef0ca2b3f89f.tar.xz
cifs: list_for_each() -> list_for_each_entry()
Replace list_for_each() by list_for_each_entr() where appropriate. Remove no longer used list_head stack variables. Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 8859da70cb06..6e670e7c2182 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2257,13 +2257,10 @@ static int match_tcon(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
static struct cifs_tcon *
cifs_find_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx)
{
- struct list_head *tmp;
struct cifs_tcon *tcon;
spin_lock(&cifs_tcp_ses_lock);
- list_for_each(tmp, &ses->tcon_list) {
- tcon = list_entry(tmp, struct cifs_tcon, tcon_list);
-
+ list_for_each_entry(tcon, &ses->tcon_list, tcon_list) {
if (!match_tcon(tcon, ctx))
continue;
++tcon->tc_count;