diff options
author | Brian Behlendorf <[email protected]> | 2010-08-26 14:24:34 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-08-26 14:24:34 -0700 |
commit | 572e285762521df27fe5b026f409ba1a21abb7ac (patch) | |
tree | f5d0e8e3bd3c0956d437251974b67d88fea46304 /module/zfs/zio_inject.c | |
parent | 1980602bfae0605d3231e79627b3e25c07991b0e (diff) |
Update to onnv_147
This is the last official OpenSolaris tag before the public
development tree was closed.
Diffstat (limited to 'module/zfs/zio_inject.c')
-rw-r--r-- | module/zfs/zio_inject.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index 16eaed668..9ae7d1f69 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -476,7 +476,6 @@ int zio_clear_fault(int id) { inject_handler_t *handler; - int ret; rw_enter(&inject_lock, RW_WRITER); @@ -486,18 +485,18 @@ zio_clear_fault(int id) 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 |