Date: Tue, 6 Aug 2013 21:41:17 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r254013 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201308062141.r76LfHJC073592@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308062141.r76LfHJC073592>