summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2023-12-29 12:16:16 +0100
committerSteve French <stfrench@microsoft.com>2023-12-29 16:11:26 +0100
commit09eeb0723f219fbd96d8865bf9b935e03ee2ec22 (patch)
tree467a8e35acae6b2259895f56bb4af14913a54796 /fs/smb/client/cifsglob.h
parentcifs: cifs_chan_is_iface_active should be called with chan_lock held (diff)
downloadlinux-09eeb0723f219fbd96d8865bf9b935e03ee2ec22.tar.xz
linux-09eeb0723f219fbd96d8865bf9b935e03ee2ec22.zip
cifs: do not depend on release_iface for maintaining iface_list
parse_server_interfaces should be in complete charge of maintaining the iface_list linked list. Today, iface entries are removed from the list only when the last refcount is dropped. i.e. in release_iface. However, this can result in undercounting of refcount if the server stops advertising interfaces (which Azure SMB server does). This change puts parse_server_interfaces in full charge of maintaining the iface_list. So if an empty list is returned by the server, the entries in the list will immediately be removed. This way, a following call to the same function will not find entries in the list. Fixes: aa45dadd34e4 ("cifs: change iface_list from array to sorted linked list") Cc: stable@vger.kernel.org Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 55b3ce944022..5e32c79f03a7 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -994,7 +994,6 @@ release_iface(struct kref *ref)
struct cifs_server_iface *iface = container_of(ref,
struct cifs_server_iface,
refcount);
- list_del_init(&iface->iface_head);
kfree(iface);
}