svn commit: r301870 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Mon Jun 13 10:53:35 UTC 2016
Author: avg
Date: Mon Jun 13 10:53:34 2016
New Revision: 301870
URL: https://svnweb.freebsd.org/changeset/base/301870
Log:
zfs_vptocnp: check for an invalid znode
... which can arise after the receive or rollback
and failed zfs_rezget().
Approved by: re (kib)
MFC after: 1 week
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Jun 13 10:35:11 2016 (r301869)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Jun 13 10:53:34 2016 (r301870)
@@ -7170,16 +7170,24 @@ zfs_vptocnp(struct vop_vptocnp_args *ap)
int ltype;
int error;
+ ZFS_ENTER(zfsvfs);
+ ZFS_VERIFY_ZP(zp);
+
/*
* If we are a snapshot mounted under .zfs, run the operation
* on the covered vnode.
*/
if ((error = sa_lookup(zp->z_sa_hdl,
- SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0)
+ SA_ZPL_PARENT(zfsvfs), &parent, sizeof (parent))) != 0) {
+ ZFS_EXIT(zfsvfs);
return (error);
+ }
- if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs)
+ if (zp->z_id != parent || zfsvfs->z_parent == zfsvfs) {
+ ZFS_EXIT(zfsvfs);
return (vop_stdvptocnp(ap));
+ }
+ ZFS_EXIT(zfsvfs);
covered_vp = vp->v_mount->mnt_vnodecovered;
vhold(covered_vp);
More information about the svn-src-head
mailing list