git: a1c555f48ba4 - main - devfs: retire the unused DEVFS_DEL_VNLOCKED flag
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Sep 2022 22:52:12 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a1c555f48ba46bcd0f13a261e164b158dc97315b commit a1c555f48ba46bcd0f13a261e164b158dc97315b Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-09-14 22:47:53 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-09-14 22:47:53 +0000 devfs: retire the unused DEVFS_DEL_VNLOCKED flag --- sys/fs/devfs/devfs.h | 3 +-- sys/fs/devfs/devfs_devs.c | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/sys/fs/devfs/devfs.h b/sys/fs/devfs/devfs.h index b62438ff6730..ef8a027a5bcb 100644 --- a/sys/fs/devfs/devfs.h +++ b/sys/fs/devfs/devfs.h @@ -185,8 +185,7 @@ extern unsigned devfs_rule_depth; #define DEVFS_DMP_HOLD(dmp) ((dmp)->dm_holdcnt++) #define DEVFS_DMP_DROP(dmp) (--(dmp)->dm_holdcnt == 0) -#define DEVFS_DEL_VNLOCKED 0x01 -#define DEVFS_DEL_NORECURSE 0x02 +#define DEVFS_DEL_NORECURSE 0x01 void devfs_rules_apply(struct devfs_mount *, struct devfs_dirent *); void devfs_rules_cleanup(struct devfs_mount *); diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 19619d94ba1c..e8786e965500 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -401,13 +401,9 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de, int flags) mtx_unlock(&devfs_de_interlock); vholdl(vp); sx_unlock(&dm->dm_lock); - if ((flags & DEVFS_DEL_VNLOCKED) == 0) - vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); - else - VI_UNLOCK(vp); + vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | LK_RETRY); vgone(vp); - if ((flags & DEVFS_DEL_VNLOCKED) == 0) - VOP_UNLOCK(vp); + VOP_UNLOCK(vp); vdrop(vp); sx_xlock(&dm->dm_lock); } else