Skip to content

Commit 0f3ff12

Browse files
committed
cifs: update iface_last_update on each query-and-update
jira LE-4669 Rebuild_History Non-Buildable kernel-4.18.0-553.82.1.el8_10 commit-author Shyam Prasad N <sprasad@microsoft.com> commit 78e727e Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-4.18.0-553.82.1.el8_10/78e727e5.failed iface_last_update was an unused field when it was introduced. Later, when we had periodic update of server interface list, this field was used regularly to decide when to update next. However, with the new logic of updating the interfaces, it becomes crucial that this field be updated whenever parse_server_interfaces runs successfully. This change updates this field when either the server does not support query of interfaces; so that we do not query the interfaces repeatedly. It also updates the field when the function reaches the end. Fixes: aa45dad ("cifs: change iface_list from array to sorted linked list") Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> (cherry picked from commit 78e727e) Signed-off-by: Jonathan Maple <jmaple@ciq.com> # Conflicts: # fs/cifs/smb2ops.c
1 parent 84ac0fd commit 0f3ff12

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
cifs: update iface_last_update on each query-and-update
2+
3+
jira LE-4669
4+
Rebuild_History Non-Buildable kernel-4.18.0-553.82.1.el8_10
5+
commit-author Shyam Prasad N <sprasad@microsoft.com>
6+
commit 78e727e58e54efca4c23863fbd9e16e9d2d83f81
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-4.18.0-553.82.1.el8_10/78e727e5.failed
10+
11+
iface_last_update was an unused field when it was introduced.
12+
Later, when we had periodic update of server interface list,
13+
this field was used regularly to decide when to update next.
14+
15+
However, with the new logic of updating the interfaces, it
16+
becomes crucial that this field be updated whenever
17+
parse_server_interfaces runs successfully.
18+
19+
This change updates this field when either the server does
20+
not support query of interfaces; so that we do not query
21+
the interfaces repeatedly. It also updates the field when
22+
the function reaches the end.
23+
24+
Fixes: aa45dadd34e4 ("cifs: change iface_list from array to sorted linked list")
25+
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
26+
Signed-off-by: Steve French <stfrench@microsoft.com>
27+
(cherry picked from commit 78e727e58e54efca4c23863fbd9e16e9d2d83f81)
28+
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
29+
30+
# Conflicts:
31+
# fs/cifs/smb2ops.c
32+
diff --cc fs/cifs/smb2ops.c
33+
index dec2f3bd2cdb,d9553c2556a2..000000000000
34+
--- a/fs/cifs/smb2ops.c
35+
+++ b/fs/cifs/smb2ops.c
36+
@@@ -558,7 -614,8 +558,12 @@@ parse_server_interfaces(struct network_
37+
"multichannel not available\n"
38+
"Empty network interface list returned by server %s\n",
39+
ses->server->hostname);
40+
++<<<<<<< HEAD:fs/cifs/smb2ops.c
41+
+ rc = -EINVAL;
42+
++=======
43+
+ rc = -EOPNOTSUPP;
44+
+ ses->iface_last_update = jiffies;
45+
++>>>>>>> 78e727e58e54 (cifs: update iface_last_update on each query-and-update):fs/smb/client/smb2ops.c
46+
goto out;
47+
}
48+
49+
@@@ -679,11 -734,7 +683,15 @@@ next_iface
50+
if ((bytes_left > 8) || p->Next)
51+
cifs_dbg(VFS, "%s: incomplete interface info\n", __func__);
52+
53+
++<<<<<<< HEAD:fs/cifs/smb2ops.c
54+
+
55+
+ if (!ses->iface_count) {
56+
+ rc = -EINVAL;
57+
+ goto out;
58+
+ }
59+
++=======
60+
+ ses->iface_last_update = jiffies;
61+
++>>>>>>> 78e727e58e54 (cifs: update iface_last_update on each query-and-update):fs/smb/client/smb2ops.c
62+
63+
out:
64+
/*
65+
* Unmerged path fs/cifs/smb2ops.c

0 commit comments

Comments
 (0)