1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00

o call dm_init_fs

This commit is contained in:
Joe Thornber 2001-08-22 13:41:00 +00:00
parent 7e95110232
commit 82a89aec65
2 changed files with 10 additions and 3 deletions

View File

@ -79,7 +79,7 @@ int dm_init_fs()
if (!(_proc_dir = create_proc_entry(_fs_dir, S_IFDIR, &proc_root)))
goto fail;
if (!(_control = create_proc_entry(_control_name, 0, _proc_dir)))
if (!(_control = create_proc_entry(_control_name, S_IFREG, _proc_dir)))
goto fail;
_control->write_proc = _line_splitter;

View File

@ -150,8 +150,13 @@ static int _request_fn(request_queue_t *q, int rw, struct buffer_head *bh);
*/
static int _init(void)
{
int ret;
init_rwsem(&_dev_lock);
if ((ret = dm_init_fs()))
return ret;
if (!dm_std_targets())
return -EIO; /* FIXME: better error value */
@ -161,7 +166,7 @@ static int _init(void)
blksize_size[MAJOR_NR] = _blksize_size;
hardsect_size[MAJOR_NR] = _hardsect_size;
if (register_blkdev(MAJOR_NR, _name, &_blk_dops) < 0) {
if (devfs_register_blkdev(MAJOR_NR, _name, &_blk_dops) < 0) {
printk(KERN_ERR "%s -- register_blkdev failed\n", _name);
return -EIO;
}
@ -175,7 +180,9 @@ static int _init(void)
static void _fin(void)
{
if (unregister_blkdev(MAJOR_NR, _name) < 0)
dm_fin_fs();
if (devfs_unregister_blkdev(MAJOR_NR, _name) < 0)
printk(KERN_ERR "%s -- unregister_blkdev failed\n", _name);
read_ahead[MAJOR_NR] = 0;