zfs: fix a panic after failed mount
r338927("zfs: depessimize zfs_root with rmlocks") failed to error check the mount before caching root vnode. Results in crashes in rrw_enter_read_impl tracing back to zfs_mount. Reported by: Mike Tancsa Tested by: allanjude Approved by: re (kib)
This commit is contained in:
parent
adf93b56dc
commit
bca84f54ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339355
@ -1929,7 +1929,8 @@ zfs_mount(vfs_t *vfsp)
|
||||
error = zfs_domount(vfsp, osname);
|
||||
PICKUP_GIANT();
|
||||
|
||||
zfs_root_setvnode((zfsvfs_t *)vfsp->vfs_data);
|
||||
if (error == 0)
|
||||
zfs_root_setvnode((zfsvfs_t *)vfsp->vfs_data);
|
||||
|
||||
#ifdef illumos
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user