diff options
author | phk <phk@FreeBSD.org> | 2003-12-13 18:12:58 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-12-13 18:12:58 +0000 |
commit | 1d294b5b4656b8e9d78b13e6eddc66022f967fdb (patch) | |
tree | 472f5d5a09396ad2696aeb0f2a15bb133d1bb6ce /sys/dev/md | |
parent | c18042c8968e30c6d2d5f2d34edecb9acaad44eb (diff) | |
download | FreeBSD-src-1d294b5b4656b8e9d78b13e6eddc66022f967fdb.zip FreeBSD-src-1d294b5b4656b8e9d78b13e6eddc66022f967fdb.tar.gz |
Fix a locking problem with MD_ROOT_SIZE.
Retire md(4)'s static major number.
Diffstat (limited to 'sys/dev/md')
-rw-r--r-- | sys/dev/md/md.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 605b7cf..06976f5 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -113,14 +113,11 @@ static int mdrootready; static int mdunits; static dev_t status_dev = 0; -#define CDEV_MAJOR 95 - static d_ioctl_t mdctlioctl; static struct cdevsw mdctl_cdevsw = { .d_ioctl = mdctlioctl, .d_name = MD_NAME, - .d_maj = CDEV_MAJOR }; @@ -1171,11 +1168,11 @@ md_drvinit(struct g_class *mp __unused) u_char *ptr, *name, *type; unsigned len; + mod = NULL; + g_topology_unlock(); #ifdef MD_ROOT_SIZE md_preloaded(mfs_root, MD_ROOT_SIZE*1024); #endif - mod = NULL; - g_topology_unlock(); while ((mod = preload_search_next_name(mod)) != NULL) { name = (char *)preload_search_info(mod, MODINFO_NAME); type = (char *)preload_search_info(mod, MODINFO_TYPE); @@ -1228,7 +1225,7 @@ static moduledata_t md_mod = { md_modevent, NULL }; -DECLARE_MODULE(md, md_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+CDEV_MAJOR); +DECLARE_MODULE(md, md_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); MODULE_VERSION(md, MD_MODVER); |