Fix page fault in zfsctl_snapdir_getattr
Must acquire the z_teardown_lock before accessing the zfsvfs_t object. I can't reproduce this panic on demand, but this looks like the correct solution. PR: 247668 Reviewed by: avg MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25543
This commit is contained in:
parent
a2de789ebb
commit
f60b4812d8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362891
@ -1121,12 +1121,13 @@ zfsctl_snapdir_getattr(ap)
|
|||||||
vnode_t *vp = ap->a_vp;
|
vnode_t *vp = ap->a_vp;
|
||||||
vattr_t *vap = ap->a_vap;
|
vattr_t *vap = ap->a_vap;
|
||||||
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
|
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
|
||||||
dsl_dataset_t *ds = dmu_objset_ds(zfsvfs->z_os);
|
dsl_dataset_t *ds;
|
||||||
sfs_node_t *node = vp->v_data;
|
sfs_node_t *node = vp->v_data;
|
||||||
uint64_t snap_count;
|
uint64_t snap_count;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
ZFS_ENTER(zfsvfs);
|
ZFS_ENTER(zfsvfs);
|
||||||
|
ds = dmu_objset_ds(zfsvfs->z_os);
|
||||||
zfsctl_common_getattr(vp, vap);
|
zfsctl_common_getattr(vp, vap);
|
||||||
vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os);
|
vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os);
|
||||||
vap->va_mtime = vap->va_ctime;
|
vap->va_mtime = vap->va_ctime;
|
||||||
|
Loading…
Reference in New Issue
Block a user