svn commit: r294794 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Tue Jan 26 12:28:54 UTC 2016
Author: mav
Date: Tue Jan 26 12:28:53 2016
New Revision: 294794
URL: https://svnweb.freebsd.org/changeset/base/294794
Log:
MFV r294793:
6367 spa_config_tryenter incorrectly handles the multiple-lock case
Reviewed by: Alek Pinchuk <alek.pinchuk at nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek at nexenta.com>
Reviewed by: Prashanth Sreenivasa <prashksp at gmail.com>
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Dan McDonald <danmcd at omniti.com>
Reviewed by: Steven Hartland <steven.hartland at multiplay.co.uk>
Approved by: Matthew Ahrens <mahrens at delphix.com>
illumos/illumos-gate at e495b6e6735b803e422025a630352ef9bba788c5
Modified:
head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
Directory Properties:
head/sys/cddl/contrib/opensolaris/ (props changed)
Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jan 26 12:26:32 2016 (r294793)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Tue Jan 26 12:28:53 2016 (r294794)
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright 2013 Martin Matuska <mm at FreeBSD.org>. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2013 Saso Kiselkov. All rights reserved.
@@ -449,14 +449,16 @@ spa_config_tryenter(spa_t *spa, int lock
if (rw == RW_READER) {
if (scl->scl_writer || scl->scl_write_wanted) {
mutex_exit(&scl->scl_lock);
- spa_config_exit(spa, locks ^ (1 << i), tag);
+ spa_config_exit(spa, locks & ((1 << i) - 1),
+ tag);
return (0);
}
} else {
ASSERT(scl->scl_writer != curthread);
if (!refcount_is_zero(&scl->scl_count)) {
mutex_exit(&scl->scl_lock);
- spa_config_exit(spa, locks ^ (1 << i), tag);
+ spa_config_exit(spa, locks & ((1 << i) - 1),
+ tag);
return (0);
}
scl->scl_writer = curthread;
More information about the svn-src-all
mailing list