mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-23 21:35:29 +03:00
o call dm_init_fs
This commit is contained in:
parent
7e95110232
commit
82a89aec65
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user