Date: Sat, 31 May 2014 00:58:34 +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: r266914 - vendor-sys/illumos/dist/uts/common/fs/zfs Message-ID: <201405310058.s4V0wYd9083096@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sat May 31 00:58:34 2014 New Revision: 266914 URL: http://svnweb.freebsd.org/changeset/base/266914 Log: 4901 zfs filesystem/snapshot limit leaks illumos/illumos-gate@adf340778b67ab4c04c186099a69e0a5435609c7 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Sat May 31 00:57:31 2014 (r266913) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c Sat May 31 00:58:34 2014 (r266914) @@ -484,7 +484,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, zap_attribute_t *za; dsl_dataset_t *ds; - ASSERT(spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); + ASSERT(spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)); ASSERT(dsl_pool_config_held(dp)); ASSERT(dmu_tx_is_syncing(tx)); @@ -1710,7 +1710,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t } if (dmu_tx_is_syncing(tx)) { - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { /* * Although this is the check function and we don't @@ -1738,8 +1738,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1, &fs_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } /* * have to add 1 for the filesystem itself that we're @@ -1750,8 +1753,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t err = zap_lookup(os, dd->dd_object, DD_FIELD_SNAPSHOT_COUNT, sizeof (ss_cnt), 1, &ss_cnt); - if (err != ENOENT && err != 0) + if (err != ENOENT && err != 0) { + dsl_dir_rele(newparent, FTAG); + dsl_dir_rele(dd, FTAG); return (err); + } } /* no rename into our descendant */ @@ -1802,7 +1808,7 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t * We already made sure the dd counts were initialized in the * check function. */ - if (spa_feature_is_enabled(dp->dp_spa, + if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_FS_SS_LIMIT)) { VERIFY0(zap_lookup(os, dd->dd_object, DD_FIELD_FILESYSTEM_COUNT, sizeof (fs_cnt), 1,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405310058.s4V0wYd9083096>