list: change locking discipline
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
2cf76fd225
commit
071a5651e0
11 changed files with 61 additions and 15 deletions
|
|
@ -313,8 +313,13 @@ void vfs_register(struct fs_driver *fs)
|
|||
return;
|
||||
|
||||
memcpy(ins, fs, sizeof(*fs));
|
||||
if (!list_insert(&fs_type_list, ins))
|
||||
list_lock(&fs_type_list);
|
||||
if (!list_insert(&fs_type_list, ins)) {
|
||||
list_unlock(&fs_type_list);
|
||||
kfree(ins);
|
||||
} else {
|
||||
list_unlock(&fs_type_list);
|
||||
}
|
||||
}
|
||||
|
||||
void vfs_init(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue