fusefs: remove the obsolete rename_lock

This lock was included in the original GSoC submission.  Its purpose
seems to have been to prevent concurrent FUSE_RENAME operations for the
current mountpoint, as well as to synchronize FUSE_RENAME with
fuse_vnode_setparent.  But it's obsolete, now that ef6ea91593 added
mnt_renamelock .

MFC after:	2 weeks
Sponsored by:	ConnectWise
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D55231
This commit is contained in:
Alan Somers
2026-02-10 13:45:23 -07:00
parent 451f593194
commit 7755a406a6
3 changed files with 0 additions and 6 deletions
-2
View File
@@ -550,7 +550,6 @@ fdata_alloc(struct cdev *fdev, struct ucred *cred)
TAILQ_INIT(&data->aw_head);
data->daemoncred = crhold(cred);
data->daemon_timeout = FUSE_DEFAULT_DAEMON_TIMEOUT;
sx_init(&data->rename_lock, "fuse rename lock");
data->ref = 1;
return data;
@@ -565,7 +564,6 @@ fdata_trydestroy(struct fuse_data *data)
return;
/* Driving off stage all that stuff thrown at device... */
sx_destroy(&data->rename_lock);
crfree(data->daemoncred);
mtx_destroy(&data->aw_mtx);
knlist_delete(&data->ks_rsel.si_note, curthread, 0);
-2
View File
@@ -194,8 +194,6 @@ struct fuse_data {
*/
u_long ticketer;
struct sx rename_lock;
uint32_t fuse_libabi_major;
uint32_t fuse_libabi_minor;
-2
View File
@@ -2272,7 +2272,6 @@ fuse_vnop_rename(struct vop_rename_args *ap)
if (err)
goto out;
}
sx_xlock(&data->rename_lock);
err = fuse_internal_rename(fdvp, fcnp, tdvp, tcnp);
if (err == 0) {
if (tdvp != fdvp)
@@ -2280,7 +2279,6 @@ fuse_vnop_rename(struct vop_rename_args *ap)
if (tvp != NULL)
fuse_vnode_setparent(tvp, NULL);
}
sx_unlock(&data->rename_lock);
if (tvp != NULL && tvp != fvp) {
cache_purge(tvp);