The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ad5e1f9c2d78e75419b10e2f871c186d772ac728

commit ad5e1f9c2d78e75419b10e2f871c186d772ac728
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2022-09-14 22:51:42 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2022-09-14 22:51:42 +0000

    devfs: stop taking the interlock in devfs_delete
    
    It buys nothing now that vhold does not require it.
---
 sys/fs/devfs/devfs_devs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index e8786e965500..71950291bf97 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -397,11 +397,10 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent 
*de, int flags)
        mtx_lock(&devfs_de_interlock);
        vp = de->de_vnode;
        if (vp != NULL) {
-               VI_LOCK(vp);
+               vhold(vp);
                mtx_unlock(&devfs_de_interlock);
-               vholdl(vp);
                sx_unlock(&dm->dm_lock);
-               vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY);
+               vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
                vgone(vp);
                VOP_UNLOCK(vp);
                vdrop(vp);

Reply via email to