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
nexedi
linux
Commits
4fa03402
Commit
4fa03402
authored
Mar 17, 2014
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcache: Fix a lockdep splat in an error path
Signed-off-by:
Kent Overstreet
<
kmo@daterainc.com
>
parent
dabb4433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
drivers/md/bcache/super.c
drivers/md/bcache/super.c
+5
-3
No files found.
drivers/md/bcache/super.c
View file @
4fa03402
...
...
@@ -1873,7 +1873,10 @@ static void register_cache(struct cache_sb *sb, struct page *sb_page,
if
(
kobject_add
(
&
ca
->
kobj
,
&
part_to_dev
(
bdev
->
bd_part
)
->
kobj
,
"bcache"
))
goto
err
;
mutex_lock
(
&
bch_register_lock
);
err
=
register_cache_set
(
ca
);
mutex_unlock
(
&
bch_register_lock
);
if
(
err
)
goto
err
;
...
...
@@ -1935,8 +1938,6 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
if
(
!
try_module_get
(
THIS_MODULE
))
return
-
EBUSY
;
mutex_lock
(
&
bch_register_lock
);
if
(
!
(
path
=
kstrndup
(
buffer
,
size
,
GFP_KERNEL
))
||
!
(
sb
=
kmalloc
(
sizeof
(
struct
cache_sb
),
GFP_KERNEL
)))
goto
err
;
...
...
@@ -1969,7 +1970,9 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
if
(
!
dc
)
goto
err_close
;
mutex_lock
(
&
bch_register_lock
);
register_bdev
(
sb
,
sb_page
,
bdev
,
dc
);
mutex_unlock
(
&
bch_register_lock
);
}
else
{
struct
cache
*
ca
=
kzalloc
(
sizeof
(
*
ca
),
GFP_KERNEL
);
if
(
!
ca
)
...
...
@@ -1982,7 +1985,6 @@ static ssize_t register_bcache(struct kobject *k, struct kobj_attribute *attr,
put_page
(
sb_page
);
kfree
(
sb
);
kfree
(
path
);
mutex_unlock
(
&
bch_register_lock
);
module_put
(
THIS_MODULE
);
return
ret
;
...
...
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