Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2016 09:50:28 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r297549 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201604040950.u349oSo7006776@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Apr  4 09:50:28 2016
New Revision: 297549
URL: https://svnweb.freebsd.org/changeset/base/297549

Log:
  MFC r297421: Plug open count leak on zvol rename.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Mon Apr  4 09:49:45 2016	(r297548)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c	Mon Apr  4 09:50:28 2016	(r297549)
@@ -2964,6 +2964,11 @@ zvol_rename_minor(zvol_state_t *zv, cons
 		ASSERT(dev != NULL);
 		zv->zv_dev = NULL;
 		destroy_dev(dev);
+		if (zv->zv_total_opens > 0) {
+			zv->zv_flags &= ~ZVOL_EXCL;
+			zv->zv_total_opens = 0;
+			zvol_last_close(zv);
+		}
 
 		make_dev_args_init(&args);
 		args.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_WAITOK;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604040950.u349oSo7006776>