diff options
author | phk <phk@FreeBSD.org> | 2002-03-16 13:47:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-03-16 13:47:57 +0000 |
commit | c262dd55af4aab137419644a6746cf9dcac36810 (patch) | |
tree | 60b74c1206066c7503fc67aa7220a67a0812c2c6 | |
parent | 45a6db344a5bf3a5260d08cf0f87615585bc6a7f (diff) | |
download | FreeBSD-src-c262dd55af4aab137419644a6746cf9dcac36810.zip FreeBSD-src-c262dd55af4aab137419644a6746cf9dcac36810.tar.gz |
Hmm, talk about optimizer-fodder. Make the DIOCGDVIRGIN hack work again.
-rw-r--r-- | sys/geom/geom_dev.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 1a94f18..092378a 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -260,12 +260,10 @@ g_dev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct thread *td) error = g_io_getattr("GEOM::ioctl", cp, &i, gio, td); g_free(gio); - if (error == 0) { - if (error != 0 && cmd == DIOCGDVIRGIN) { - g_topology_lock(); - gp = g_create_geomf("BSD-method", cp->provider, NULL); - g_topology_unlock(); - } + if (error != 0 && cmd == DIOCGDVIRGIN) { + g_topology_lock(); + gp = g_create_geomf("BSD-method", cp->provider, NULL); + g_topology_unlock(); } mtx_lock(&Giant); g_rattle(); |