diff options
author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-03-19 10:35:56 +0000 |
---|---|---|
committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-03-19 10:35:56 +0000 |
commit | b04cacfa008eb56229f7aa2ec7c09898947f99db (patch) | |
tree | 71a64ddf64b1dd8be08248352219ae63df90c88d | |
parent | 07ebd7d745d604bf0b9e825ba8d2d55374378bcb (diff) |
Notes
-rw-r--r-- | sys/kern/vfs_mountroot.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 5071d33eed6b..d7a3f526a04a 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -171,9 +171,6 @@ root_mount_hold(const char *identifier) { struct root_hold_token *h; - if (root_mounted()) - return (NULL); - h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; mtx_lock(&root_holds_mtx); @@ -186,8 +183,8 @@ void root_mount_rel(struct root_hold_token *h) { - if (h == NULL) - return; + KASSERT(h != NULL, ("%s: NULL token", __func__)); + mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); wakeup(&root_holds); |