usr/src/uts/common/fs/zfs/zfs_znode.c
changeset 10250 b179ceb34b62
parent 10143 d2d432dfe597
child 10269 2788675568fd
equal deleted inserted replaced
10249:1e37fc71a3af 10250:b179ceb34b62
   198 	nzp->z_last_itx = ozp->z_last_itx;
   198 	nzp->z_last_itx = ozp->z_last_itx;
   199 	nzp->z_gen = ozp->z_gen;
   199 	nzp->z_gen = ozp->z_gen;
   200 	nzp->z_sync_cnt = ozp->z_sync_cnt;
   200 	nzp->z_sync_cnt = ozp->z_sync_cnt;
   201 	nzp->z_phys = ozp->z_phys;
   201 	nzp->z_phys = ozp->z_phys;
   202 	nzp->z_dbuf = ozp->z_dbuf;
   202 	nzp->z_dbuf = ozp->z_dbuf;
   203 	nzp->z_acl_cached = ozp->z_acl_cached;
   203 
       
   204 	/*
       
   205 	 * Release any cached ACL, since it *may* have
       
   206 	 * zfs_acl_node_t's that directly references an
       
   207 	 * embedded ACL in the zp_acl of the old znode_phys_t
       
   208 	 *
       
   209 	 * It will be recached the next time the ACL is needed.
       
   210 	 */
       
   211 	if (ozp->z_acl_cached) {
       
   212 		zfs_acl_free(ozp->z_acl_cached);
       
   213 		ozp->z_acl_cached = NULL;
       
   214 	}
   204 
   215 
   205 	/* Update back pointers. */
   216 	/* Update back pointers. */
   206 	(void) dmu_buf_update_user(nzp->z_dbuf, ozp, nzp, &nzp->z_phys,
   217 	(void) dmu_buf_update_user(nzp->z_dbuf, ozp, nzp, &nzp->z_phys,
   207 	    znode_evict_error);
   218 	    znode_evict_error);
   208 
   219 
   211 	 * pointer back to the znode. Set the low bit of the vfs pointer to
   222 	 * pointer back to the znode. Set the low bit of the vfs pointer to
   212 	 * ensure that zfs_znode_move() recognizes the znode as invalid in any
   223 	 * ensure that zfs_znode_move() recognizes the znode as invalid in any
   213 	 * subsequent callback.
   224 	 * subsequent callback.
   214 	 */
   225 	 */
   215 	ozp->z_dbuf = NULL;
   226 	ozp->z_dbuf = NULL;
   216 	ozp->z_acl_cached = NULL;
       
   217 	POINTER_INVALIDATE(&ozp->z_zfsvfs);
   227 	POINTER_INVALIDATE(&ozp->z_zfsvfs);
   218 }
   228 }
   219 
   229 
   220 /*ARGSUSED*/
   230 /*ARGSUSED*/
   221 static kmem_cbrc_t
   231 static kmem_cbrc_t