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
342827d7
Commit
342827d7
authored
Mar 17, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocfs2: fix leaks on failure exits in module_init
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
0794f569
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
fs/ocfs2/super.c
fs/ocfs2/super.c
+21
-19
No files found.
fs/ocfs2/super.c
View file @
342827d7
...
...
@@ -1624,21 +1624,17 @@ static int __init ocfs2_init(void)
init_waitqueue_head
(
&
ocfs2__ioend_wq
[
i
]);
status
=
init_ocfs2_uptodate_cache
();
if
(
status
<
0
)
{
mlog_errno
(
status
);
goto
leave
;
}
if
(
status
<
0
)
goto
out1
;
status
=
ocfs2_initialize_mem_caches
();
if
(
status
<
0
)
{
mlog_errno
(
status
);
goto
leave
;
}
if
(
status
<
0
)
goto
out2
;
ocfs2_wq
=
create_singlethread_workqueue
(
"ocfs2_wq"
);
if
(
!
ocfs2_wq
)
{
status
=
-
ENOMEM
;
goto
leave
;
goto
out3
;
}
ocfs2_debugfs_root
=
debugfs_create_dir
(
"ocfs2"
,
NULL
);
...
...
@@ -1650,17 +1646,23 @@ static int __init ocfs2_init(void)
ocfs2_set_locking_protocol
();
status
=
register_quota_format
(
&
ocfs2_quota_format
);
leave:
if
(
status
<
0
)
{
ocfs2_free_mem_caches
();
exit_ocfs2_uptodate_cache
();
mlog_errno
(
status
);
}
if
(
status
<
0
)
goto
out4
;
status
=
register_filesystem
(
&
ocfs2_fs_type
);
if
(
!
status
)
return
0
;
if
(
status
>=
0
)
{
return
register_filesystem
(
&
ocfs2_fs_type
);
}
else
return
-
1
;
unregister_quota_format
(
&
ocfs2_quota_format
);
out4:
destroy_workqueue
(
ocfs2_wq
);
debugfs_remove
(
ocfs2_debugfs_root
);
out3:
ocfs2_free_mem_caches
();
out2:
exit_ocfs2_uptodate_cache
();
out1:
mlog_errno
(
status
);
return
status
;
}
static
void
__exit
ocfs2_exit
(
void
)
...
...
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