mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
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. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Authored-by: asomers <asomers@FreeBSD.org> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10656
This commit is contained in:
parent
8fb79fdddb
commit
fe628bc21d
@ -1088,11 +1088,12 @@ zfsctl_snapdir_getattr(struct vop_getattr_args *ap)
|
||||
vnode_t *vp = ap->a_vp;
|
||||
vattr_t *vap = ap->a_vap;
|
||||
zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data;
|
||||
dsl_dataset_t *ds = dmu_objset_ds(zfsvfs->z_os);
|
||||
dsl_dataset_t *ds;
|
||||
uint64_t snap_count;
|
||||
int err;
|
||||
|
||||
ZFS_ENTER(zfsvfs);
|
||||
ds = dmu_objset_ds(zfsvfs->z_os);
|
||||
zfsctl_common_getattr(vp, vap);
|
||||
vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os);
|
||||
vap->va_mtime = vap->va_ctime;
|
||||
|
Loading…
Reference in New Issue
Block a user