From: Thomas Nikolajsen Date: Wed, 11 Nov 2009 17:56:47 +0000 (+0100) Subject: hammer: hammer_recover_stage2() may only be called for read-write mounts X-Git-Url: https://gitweb.dragonflybsd.org/~polachok/dragonfly.git/commitdiff_plain/88c39f646285be57786ea5be0a443f35fbbe8d21 hammer: hammer_recover_stage2() may only be called for read-write mounts This fixes panic doing readonly mount. --- diff --git a/sys/vfs/hammer/hammer_vfsops.c b/sys/vfs/hammer/hammer_vfsops.c index 757a398cb5..fa478bf2cd 100644 --- a/sys/vfs/hammer/hammer_vfsops.c +++ b/sys/vfs/hammer/hammer_vfsops.c @@ -659,7 +659,8 @@ hammer_vfs_mount(struct mount *mp, char *mntpt, caddr_t data, goto done; vput(rootvp); /*vn_unlock(hmp->rootvp);*/ - error = hammer_recover_stage2(hmp, rootvol); + if (hmp->ronly == 0) + error = hammer_recover_stage2(hmp, rootvol); done: hammer_rel_volume(rootvol, 0);