Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
2f4cbe64
Commit
2f4cbe64
authored
Nov 19, 2007
by
Wyatt Banks
Committed by
Chris Mason
Sep 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Return value checking in module init
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
3acd7ee8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
6 deletions
+33
-6
fs/btrfs/extent_map.c
fs/btrfs/extent_map.c
+14
-2
fs/btrfs/extent_map.h
fs/btrfs/extent_map.h
+1
-1
fs/btrfs/super.c
fs/btrfs/super.c
+18
-3
No files found.
fs/btrfs/extent_map.c
View file @
2f4cbe64
...
...
@@ -42,18 +42,30 @@ struct extent_page_data {
struct
extent_map_tree
*
tree
;
get_extent_t
*
get_extent
;
};
void
__init
extent_map_init
(
void
)
int
__init
extent_map_init
(
void
)
{
extent_map_cache
=
btrfs_cache_create
(
"extent_map"
,
sizeof
(
struct
extent_map
),
0
,
NULL
);
if
(
!
extent_map_cache
)
return
-
ENOMEM
;
extent_state_cache
=
btrfs_cache_create
(
"extent_state"
,
sizeof
(
struct
extent_state
),
0
,
NULL
);
if
(
!
extent_state_cache
)
goto
free_map_cache
;
extent_buffer_cache
=
btrfs_cache_create
(
"extent_buffers"
,
sizeof
(
struct
extent_buffer
),
0
,
NULL
);
if
(
!
extent_buffer_cache
)
goto
free_state_cache
;
return
0
;
free_state_cache:
kmem_cache_destroy
(
extent_state_cache
);
free_map_cache:
kmem_cache_destroy
(
extent_map_cache
);
return
-
ENOMEM
;
}
void
__exit
extent_map_exit
(
void
)
...
...
fs/btrfs/extent_map.h
View file @
2f4cbe64
...
...
@@ -110,7 +110,7 @@ struct extent_map *alloc_extent_map(gfp_t mask);
void
free_extent_map
(
struct
extent_map
*
em
);
int
extent_read_full_page
(
struct
extent_map_tree
*
tree
,
struct
page
*
page
,
get_extent_t
*
get_extent
);
void
__init
extent_map_init
(
void
);
int
__init
extent_map_init
(
void
);
void
__exit
extent_map_exit
(
void
);
int
test_range_bit
(
struct
extent_map_tree
*
tree
,
u64
start
,
u64
end
,
...
...
fs/btrfs/super.c
View file @
2f4cbe64
...
...
@@ -347,9 +347,24 @@ static int __init init_btrfs_fs(void)
btrfs_init_transaction_sys
();
err
=
btrfs_init_cachep
();
if
(
err
)
goto
free_transaction_sys
;
err
=
extent_map_init
();
if
(
err
)
goto
free_cachep
;
err
=
register_filesystem
(
&
btrfs_fs_type
);
if
(
err
)
goto
free_extent_map
;
return
0
;
free_extent_map:
extent_map_exit
();
free_cachep:
btrfs_destroy_cachep
();
free_transaction_sys:
btrfs_exit_transaction_sys
();
btrfs_exit_sysfs
();
return
err
;
extent_map_init
();
return
register_filesystem
(
&
btrfs_fs_type
);
}
static
void
__exit
exit_btrfs_fs
(
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