git: 61a1d5dde216 - main - vfs: stop using the V_MNTREF flag
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 14 Sep 2022 18:16:57 UTC
The branch main has been updated by mjg:
URL: https://cgit.FreeBSD.org/src/commit/?id=61a1d5dde21695d710a6028ece79bb98e22ca6af
commit 61a1d5dde21695d710a6028ece79bb98e22ca6af
Author: Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-09-10 20:12:08 +0000
Commit: Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-09-14 18:16:23 +0000
vfs: stop using the V_MNTREF flag
Reviewed by: kib, mckusick
Differential Revision: https://reviews.freebsd.org/D36521
---
sys/kern/vfs_mount.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 7d74ec8b0a9e..31566f521d22 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1703,6 +1703,7 @@ dounmount_cleanup(struct mount *mp, struct vnode *coveredvp, int mntkflags)
vdrop(coveredvp);
}
vn_finished_write(mp);
+ vfs_rel(mp);
}
/*
@@ -2127,7 +2128,7 @@ dounmount(struct mount *mp, uint64_t flags, struct thread *td)
vfs_op_enter(mp);
- vn_start_write(NULL, &mp, V_WAIT | V_MNTREF);
+ vn_start_write(NULL, &mp, V_WAIT);
MNT_ILOCK(mp);
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 ||
(mp->mnt_flag & MNT_UPDATE) != 0 ||
@@ -2200,6 +2201,7 @@ dounmount(struct mount *mp, uint64_t flags, struct thread *td)
vfs_deallocate_syncvnode(mp);
error = VFS_UNMOUNT(mp, flags);
vn_finished_write(mp);
+ vfs_rel(mp);
/*
* If we failed to flush the dirty blocks for this mount point,
* undo all the cdir/rdir and rootvnode changes we made above.