From a0dc2951a04dc9cb13b8dd7ef6e4a23b48b6824f Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Tue, 12 Aug 2008 13:43:23 -0700 Subject: [PATCH] 6736061 recursive rename of snapshot fails if child snapshot doesn't exist --- usr/src/uts/common/fs/zfs/dsl_dataset.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr/src/uts/common/fs/zfs/dsl_dataset.c b/usr/src/uts/common/fs/zfs/dsl_dataset.c index d5dd08fa0f..30bda57887 100644 --- a/usr/src/uts/common/fs/zfs/dsl_dataset.c +++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -2064,7 +2062,10 @@ dsl_snapshot_rename_one(char *name, void *arg) * For recursive snapshot renames the parent won't be changing * so we just pass name for both the to/from argument. */ - if (err = zfs_secpolicy_rename_perms(name, name, CRED())) { + err = zfs_secpolicy_rename_perms(name, name, CRED()); + if (err == ENOENT) { + return (0); + } else if (err) { (void) strcpy(ra->failed, name); return (err); } -- 2.11.4.GIT