diff options
author | Paulo Alcantara <pc@manguebit.com> | 2025-01-17 17:38:56 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2025-01-22 20:13:49 -0600 |
commit | 0a9b00e5e5c5fc3c77cbfd01e6ffbe77fc7fe74a (patch) | |
tree | d7d3c22f0337916966036ae3f7bcc2e0de4e8109 /fs/smb/client/dfs_cache.c | |
parent | 2948f0d4db40d839db2c1d141121c2e4e12a6faa (diff) |
smb: client: get rid of TCP_Server_Info::refpath_lock
TCP_Server_Info::leaf_fullpath is allocated in cifs_get_tcp_session()
and never changed afterwards, so there is no need to serialize its
access.
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/dfs_cache.c')
-rw-r--r-- | fs/smb/client/dfs_cache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/smb/client/dfs_cache.c b/fs/smb/client/dfs_cache.c index 72527623f433..5022bb1f122a 100644 --- a/fs/smb/client/dfs_cache.c +++ b/fs/smb/client/dfs_cache.c @@ -1141,13 +1141,11 @@ static char *get_ses_refpath(struct cifs_ses *ses) struct TCP_Server_Info *server = ses->server; char *path = ERR_PTR(-ENOENT); - mutex_lock(&server->refpath_lock); if (server->leaf_fullpath) { - path = kstrdup(server->leaf_fullpath + 1, GFP_ATOMIC); + path = kstrdup(server->leaf_fullpath + 1, GFP_KERNEL); if (!path) path = ERR_PTR(-ENOMEM); } - mutex_unlock(&server->refpath_lock); return path; } |