Page MenuHomeFreeBSD

D5413.diff
No OneTemporary

D5413.diff

Index: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
===================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -115,27 +115,14 @@
if (error == 0) {
char *old_physpath;
+ /* g_topology lock ensures that vdev has not been closed */
+ g_topology_assert();
old_physpath = vd->vdev_physpath;
vd->vdev_physpath = spa_strdup(physpath);
spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE);
- if (old_physpath != NULL) {
- int held_lock;
-
- held_lock = spa_config_held(spa, SCL_STATE, RW_WRITER);
- if (held_lock == 0) {
- g_topology_unlock();
- spa_config_enter(spa, SCL_STATE, FTAG,
- RW_WRITER);
- }
-
+ if (old_physpath != NULL)
spa_strfree(old_physpath);
-
- if (held_lock == 0) {
- spa_config_exit(spa, SCL_STATE, FTAG);
- g_topology_lock();
- }
- }
}
g_free(physpath);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 6:09 AM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16025863
Default Alt Text
D5413.diff (996 B)

Event Timeline