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
d3f21473
Commit
d3f21473
authored
Mar 23, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move grabbing s_umount to callers of grab_super()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
7ed1ee61
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
fs/block_dev.c
fs/block_dev.c
+1
-0
fs/super.c
fs/super.c
+2
-2
No files found.
fs/block_dev.c
View file @
d3f21473
...
@@ -245,6 +245,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
...
@@ -245,6 +245,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
sb
=
get_active_super
(
bdev
);
sb
=
get_active_super
(
bdev
);
if
(
!
sb
)
if
(
!
sb
)
goto
out
;
goto
out
;
down_write
(
&
sb
->
s_umount
);
if
(
sb
->
s_flags
&
MS_RDONLY
)
{
if
(
sb
->
s_flags
&
MS_RDONLY
)
{
sb
->
s_frozen
=
SB_FREEZE_TRANS
;
sb
->
s_frozen
=
SB_FREEZE_TRANS
;
up_write
(
&
sb
->
s_umount
);
up_write
(
&
sb
->
s_umount
);
...
...
fs/super.c
View file @
d3f21473
...
@@ -210,7 +210,6 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
...
@@ -210,7 +210,6 @@ static int grab_super(struct super_block *s) __releases(sb_lock)
{
{
if
(
atomic_inc_not_zero
(
&
s
->
s_active
))
{
if
(
atomic_inc_not_zero
(
&
s
->
s_active
))
{
spin_unlock
(
&
sb_lock
);
spin_unlock
(
&
sb_lock
);
down_write
(
&
s
->
s_umount
);
return
1
;
return
1
;
}
}
/* it's going away */
/* it's going away */
...
@@ -317,6 +316,7 @@ struct super_block *sget(struct file_system_type *type,
...
@@ -317,6 +316,7 @@ struct super_block *sget(struct file_system_type *type,
up_write
(
&
s
->
s_umount
);
up_write
(
&
s
->
s_umount
);
destroy_super
(
s
);
destroy_super
(
s
);
}
}
down_write
(
&
old
->
s_umount
);
return
old
;
return
old
;
}
}
}
}
...
@@ -466,7 +466,7 @@ EXPORT_SYMBOL(get_super);
...
@@ -466,7 +466,7 @@ EXPORT_SYMBOL(get_super);
*
*
* Scans the superblock list and finds the superblock of the file system
* Scans the superblock list and finds the superblock of the file system
* mounted on the device given. Returns the superblock with an active
* mounted on the device given. Returns the superblock with an active
* reference
and s_umount held exclusively
or %NULL if none was found.
* reference or %NULL if none was found.
*/
*/
struct
super_block
*
get_active_super
(
struct
block_device
*
bdev
)
struct
super_block
*
get_active_super
(
struct
block_device
*
bdev
)
{
{
...
...
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