changeset 12662:b0fe99c06d14

6960054 faulting data/log device causing cluster head inaccessible
author Mark J Musante <Mark.Musante@Sun.COM>
date Mon, 21 Jun 2010 13:48:11 -0600
parents 55116f31ff63
children e9e245236783
files usr/src/uts/common/fs/zfs/zio_inject.c
diffstat 1 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/zio_inject.c	Mon Jun 21 14:34:21 2010 -0400
+++ b/usr/src/uts/common/fs/zfs/zio_inject.c	Mon Jun 21 13:48:11 2010 -0600
@@ -476,7 +476,6 @@
 zio_clear_fault(int id)
 {
 	inject_handler_t *handler;
-	int ret;
 
 	rw_enter(&inject_lock, RW_WRITER);
 
@@ -486,18 +485,18 @@
 			break;
 
 	if (handler == NULL) {
-		ret = ENOENT;
-	} else {
-		list_remove(&inject_handlers, handler);
-		spa_inject_delref(handler->zi_spa);
-		kmem_free(handler, sizeof (inject_handler_t));
-		atomic_add_32(&zio_injection_enabled, -1);
-		ret = 0;
+		rw_exit(&inject_lock);
+		return (ENOENT);
 	}
 
+	list_remove(&inject_handlers, handler);
 	rw_exit(&inject_lock);
 
-	return (ret);
+	spa_inject_delref(handler->zi_spa);
+	kmem_free(handler, sizeof (inject_handler_t));
+	atomic_add_32(&zio_injection_enabled, -1);
+
+	return (0);
 }
 
 void