svn commit: r254013 - vendor-sys/illumos/dist/uts/common/fs/zfs
Xin LI
delphij at FreeBSD.org
Tue Aug 6 21:41:17 UTC 2013
Author: delphij
Date: Tue Aug 6 21:41:16 2013
New Revision: 254013
URL: http://svnweb.freebsd.org/changeset/base/254013
Log:
Update vendor-sys/illumos/dist to illumos-gate 14116:b0233279e3fc:
Illumos ZFS issues:
3973 zfs_ioc_rename alters passed in zc->zc_name
This change was committed on FreeBSD as r253926.
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Aug 6 21:36:01 2013 (r254012)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Tue Aug 6 21:41:16 2013 (r254013)
@@ -3552,18 +3552,25 @@ zfs_ioc_rename(zfs_cmd_t *zc)
at = strchr(zc->zc_name, '@');
if (at != NULL) {
/* snaps must be in same fs */
+ int error;
+
if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1))
return (SET_ERROR(EXDEV));
*at = '\0';
if (zc->zc_objset_type == DMU_OST_ZFS) {
- int error = dmu_objset_find(zc->zc_name,
+ error = dmu_objset_find(zc->zc_name,
recursive_unmount, at + 1,
recursive ? DS_FIND_CHILDREN : 0);
- if (error != 0)
+ if (error != 0) {
+ *at = '@';
return (error);
+ }
}
- return (dsl_dataset_rename_snapshot(zc->zc_name,
- at + 1, strchr(zc->zc_value, '@') + 1, recursive));
+ error = dsl_dataset_rename_snapshot(zc->zc_name,
+ at + 1, strchr(zc->zc_value, '@') + 1, recursive);
+ *at = '@';
+
+ return (error);
} else {
if (zc->zc_objset_type == DMU_OST_ZVOL)
(void) zvol_remove_minor(zc->zc_name);
More information about the svn-src-vendor
mailing list