mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
vfs_domount_update(): ensure that 'goto end' works
We need to vfs_op_enter()/vn_seqc_write_start() before jumping to
cleanup.
PR: 274992
Reported by: trasz
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Fixes: 9ef7a491a4
This commit is contained in:
parent
af21145f33
commit
ede4c412b3
|
@ -1380,6 +1380,8 @@ vfs_domount_update(
|
|||
VOP_UNLOCK(vp);
|
||||
|
||||
rootvp = NULL;
|
||||
vfs_op_enter(mp);
|
||||
vn_seqc_write_begin(vp);
|
||||
|
||||
if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up,
|
||||
&fsid_up_len) == 0) {
|
||||
|
@ -1394,9 +1396,6 @@ vfs_domount_update(
|
|||
vfs_deleteopt(*optlist, "fsid");
|
||||
}
|
||||
|
||||
vfs_op_enter(mp);
|
||||
vn_seqc_write_begin(vp);
|
||||
|
||||
MNT_ILOCK(mp);
|
||||
if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
|
||||
MNT_IUNLOCK(mp);
|
||||
|
|
Loading…
Reference in a new issue