dsl_dataset.c (11823:c756cd80d532) | dsl_dataset.c (12115:3655f38d3bea) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* |
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. | 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
24 */ 25 26#include <sys/dmu_objset.h> 27#include <sys/dsl_dataset.h> 28#include <sys/dsl_dir.h> 29#include <sys/dsl_prop.h> 30#include <sys/dsl_synctask.h> 31#include <sys/dmu_traverse.h> --- 3539 unchanged lines hidden (view full) --- 3571 error = dsl_dataset_release_might_destroy(ds, ha->htag, &might_destroy); 3572 if (error) { 3573 dsl_dataset_rele(ds, dtag); 3574 return (error); 3575 } 3576 3577 if (might_destroy) { 3578#ifdef _KERNEL | 23 */ 24 25#include <sys/dmu_objset.h> 26#include <sys/dsl_dataset.h> 27#include <sys/dsl_dir.h> 28#include <sys/dsl_prop.h> 29#include <sys/dsl_synctask.h> 30#include <sys/dmu_traverse.h> --- 3539 unchanged lines hidden (view full) --- 3570 error = dsl_dataset_release_might_destroy(ds, ha->htag, &might_destroy); 3571 if (error) { 3572 dsl_dataset_rele(ds, dtag); 3573 return (error); 3574 } 3575 3576 if (might_destroy) { 3577#ifdef _KERNEL |
3578 name = kmem_asprintf("%s@%s", dsname, ha->snapname); |
|
3579 error = zfs_unmount_snap(name, NULL); | 3579 error = zfs_unmount_snap(name, NULL); |
3580 strfree(name); |
|
3580 if (error) { 3581 dsl_dataset_rele(ds, dtag); 3582 return (error); 3583 } 3584#endif 3585 if (!dsl_dataset_tryown(ds, B_TRUE, dtag)) { 3586 dsl_dataset_rele(ds, dtag); 3587 return (EBUSY); --- 167 unchanged lines hidden --- | 3581 if (error) { 3582 dsl_dataset_rele(ds, dtag); 3583 return (error); 3584 } 3585#endif 3586 if (!dsl_dataset_tryown(ds, B_TRUE, dtag)) { 3587 dsl_dataset_rele(ds, dtag); 3588 return (EBUSY); --- 167 unchanged lines hidden --- |