diff mbox series

[v2,2/2] smb: cached_dir.c: rename smb2_close_cached_fid() to release_cached_dir()

Message ID 20250502225213.330418-2-henrique.carvalho@suse.com
State New
Headers show
Series [v2,1/2] smb: cached_dir.c: fix race in cfid release | expand

Commit Message

Henrique Carvalho May 2, 2025, 10:52 p.m. UTC
smb2_close_cached_fid() is a kref release callback.
Renaming it to release_cached_dir() makes its role immediately
obvious and aligns with the rest of the naming used in the file.

No functional change.

Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
---
V1 -> V2: split into second patch and change only function private
to cached_dir.c to minimize the risk of backport failure

 fs/smb/client/cached_dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index fc19c26bb014..43228ec2424d 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -14,7 +14,7 @@ 
 
 static struct cached_fid *init_cached_dir(const char *path);
 static void free_cached_dir(struct cached_fid *cfid);
-static void smb2_close_cached_fid(struct kref *ref);
+static void release_cached_dir(struct kref *ref);
 static void cfids_laundromat_worker(struct work_struct *work);
 
 struct cached_dir_dentry {
@@ -420,7 +420,7 @@  int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
 }
 
 static void
-smb2_close_cached_fid(struct kref *ref)
+release_cached_dir(struct kref *ref)
 __releases(&cfid->cfids->cfid_list_lock)
 {
 	struct cached_fid *cfid = container_of(ref, struct cached_fid,
@@ -478,7 +478,7 @@  void drop_cached_dir_by_name(const unsigned int xid, struct cifs_tcon *tcon,
 void close_cached_dir(struct cached_fid *cfid)
 {
 	kref_put_lock(&cfid->refcount, 
-		      smb2_close_cached_fid,
+		      release_cached_dir,
 		      &cfid->cfids->cfid_list_lock);
 }