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
4036ebfa18
commit
01b5ac964b
@ -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