Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2d403771
Commit
2d403771
authored
Dec 03, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Dec 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dm cleanup
switched to devfs_remove(), killed gratitious devfs_handle_t field.
parent
fc39ecaa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
drivers/md/dm-ioctl.c
drivers/md/dm-ioctl.c
+9
-13
No files found.
drivers/md/dm-ioctl.c
View file @
2d403771
...
...
@@ -30,9 +30,6 @@ struct hash_cell {
char
*
name
;
char
*
uuid
;
struct
mapped_device
*
md
;
/* I hate devfs */
devfs_handle_t
devfs_entry
;
};
#define NUM_BUCKETS 64
...
...
@@ -40,7 +37,6 @@ struct hash_cell {
static
struct
list_head
_name_buckets
[
NUM_BUCKETS
];
static
struct
list_head
_uuid_buckets
[
NUM_BUCKETS
];
static
devfs_handle_t
_dev_dir
;
void
dm_hash_remove_all
(
void
);
/*
...
...
@@ -60,14 +56,14 @@ int dm_hash_init(void)
{
init_buckets
(
_name_buckets
);
init_buckets
(
_uuid_buckets
);
_dev_dir
=
devfs_mk_dir
(
0
,
DM_DIR
,
NULL
);
devfs_mk_dir
(
NULL
,
DM_DIR
,
NULL
);
return
0
;
}
void
dm_hash_exit
(
void
)
{
dm_hash_remove_all
();
devfs_
unregister
(
_dev_dir
);
devfs_
remove
(
DM_DIR
);
}
/*-----------------------------------------------------------------
...
...
@@ -177,20 +173,20 @@ static void free_cell(struct hash_cell *hc)
*/
static
int
register_with_devfs
(
struct
hash_cell
*
hc
)
{
char
name
[
32
];
struct
gendisk
*
disk
=
dm_disk
(
hc
->
md
);
hc
->
devfs_entry
=
devfs_register
(
_dev_dir
,
hc
->
name
,
DEVFS_FL_CURRENT_OWNER
,
sprintf
(
name
,
DM_DIR
"/%s"
,
hc
->
name
);
devfs_register
(
NULL
,
name
,
DEVFS_FL_CURRENT_OWNER
,
disk
->
major
,
disk
->
first_minor
,
S_IFBLK
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
,
&
dm_blk_dops
,
NULL
);
return
0
;
}
static
int
unregister_with_devfs
(
struct
hash_cell
*
hc
)
{
devfs_
unregister
(
hc
->
devfs_entry
);
devfs_
remove
(
DM_DIR
"/%s"
,
hc
->
name
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment