]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: remove unused fid_lock
authorHenrique Carvalho <henrique.carvalho@suse.com>
Mon, 2 Jun 2025 20:45:17 +0000 (17:45 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 2 Oct 2025 03:05:19 +0000 (22:05 -0500)
commit17ef15fa80cf3b60b6f82ea1d88fa499d5495994
treee199f8eda54c5f4ebddb070376e8c89b4bf8f2af
parent5676398315b73f21d6a4e2d36606ce94e8afc79e
smb: client: remove unused fid_lock

The fid_lock in struct cached_fid does not currently provide any real
synchronization. Previously, it had the intention to prevent a double
release of the dentry, but every change to cfid->dentry is already
protected either by cfid_list_lock (while the entry is in the list) or
happens after the cfid has been removed (so no other thread should find
it).

Since there is no scenario in which fid_lock prevents any race, it is
vestigial and can be removed along with its associated
spin_lock()/spin_unlock() calls.

Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cached_dir.c
fs/smb/client/cached_dir.h