Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
xcap
xcap-capability-linux
Commits
1494583d
Commit
1494583d
authored
Mar 22, 2010
by
Al Viro
Browse files
fix get_active_super()/umount() race
This one needs restarts... Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e7fe0585
Changes
1
Show whitespace changes
Inline
Side-by-side
fs/super.c
View file @
1494583d
...
...
@@ -471,17 +471,17 @@ struct super_block *get_active_super(struct block_device *bdev)
if
(
!
bdev
)
return
NULL
;
restart:
spin_lock
(
&
sb_lock
);
list_for_each_entry
(
sb
,
&
super_blocks
,
s_list
)
{
if
(
list_empty
(
&
sb
->
s_instances
))
continue
;
if
(
sb
->
s_bdev
!=
bdev
)
continue
;
if
(
sb
->
s_bdev
==
bdev
)
{
if
(
grab_super
(
sb
))
/* drops sb_lock */
return
sb
;
spin_lock
(
&
sb_lock
);
else
goto
restart
;
}
}
spin_unlock
(
&
sb_lock
);
return
NULL
;
...
...
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