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
6f5bbff9
Commit
6f5bbff9
authored
May 06, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert obvious places to deactivate_locked_super()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
74dbbdd7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
21 additions
and
42 deletions
+21
-42
drivers/mtd/mtdsuper.c
drivers/mtd/mtdsuper.c
+1
-2
fs/9p/vfs_super.c
fs/9p/vfs_super.c
+1
-4
fs/afs/super.c
fs/afs/super.c
+1
-2
fs/btrfs/super.c
fs/btrfs/super.c
+4
-8
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+1
-2
fs/devpts/inode.c
fs/devpts/inode.c
+2
-3
fs/ecryptfs/main.c
fs/ecryptfs/main.c
+2
-3
fs/libfs.c
fs/libfs.c
+1
-2
fs/nfs/super.c
fs/nfs/super.c
+5
-10
fs/proc/root.c
fs/proc/root.c
+1
-2
fs/ubifs/super.c
fs/ubifs/super.c
+1
-2
kernel/cgroup.c
kernel/cgroup.c
+1
-2
No files found.
drivers/mtd/mtdsuper.c
View file @
6f5bbff9
...
@@ -74,8 +74,7 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags,
...
@@ -74,8 +74,7 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags,
ret
=
fill_super
(
sb
,
data
,
flags
&
MS_SILENT
?
1
:
0
);
ret
=
fill_super
(
sb
,
data
,
flags
&
MS_SILENT
?
1
:
0
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
return
ret
;
return
ret
;
}
}
...
...
fs/9p/vfs_super.c
View file @
6f5bbff9
...
@@ -174,10 +174,7 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
...
@@ -174,10 +174,7 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
return
0
;
return
0
;
release_sb:
release_sb:
if
(
sb
)
{
deactivate_locked_super
(
sb
);
up_write
(
&
sb
->
s_umount
);
deactivate_super
(
sb
);
}
free_stat:
free_stat:
kfree
(
st
);
kfree
(
st
);
...
...
fs/afs/super.c
View file @
6f5bbff9
...
@@ -405,8 +405,7 @@ static int afs_get_sb(struct file_system_type *fs_type,
...
@@ -405,8 +405,7 @@ static int afs_get_sb(struct file_system_type *fs_type,
sb
->
s_flags
=
flags
;
sb
->
s_flags
=
flags
;
ret
=
afs_fill_super
(
sb
,
&
params
);
ret
=
afs_fill_super
(
sb
,
&
params
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
goto
error
;
goto
error
;
}
}
sb
->
s_options
=
new_opts
;
sb
->
s_options
=
new_opts
;
...
...
fs/btrfs/super.c
View file @
6f5bbff9
...
@@ -502,8 +502,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -502,8 +502,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
if
(
s
->
s_root
)
{
if
(
s
->
s_root
)
{
if
((
flags
^
s
->
s_flags
)
&
MS_RDONLY
)
{
if
((
flags
^
s
->
s_flags
)
&
MS_RDONLY
)
{
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
error
=
-
EBUSY
;
error
=
-
EBUSY
;
goto
error_close_devices
;
goto
error_close_devices
;
}
}
...
@@ -517,8 +516,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -517,8 +516,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
error
=
btrfs_fill_super
(
s
,
fs_devices
,
data
,
error
=
btrfs_fill_super
(
s
,
fs_devices
,
data
,
flags
&
MS_SILENT
?
1
:
0
);
flags
&
MS_SILENT
?
1
:
0
);
if
(
error
)
{
if
(
error
)
{
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
goto
error_free_subvol_name
;
goto
error_free_subvol_name
;
}
}
...
@@ -535,15 +533,13 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -535,15 +533,13 @@ static int btrfs_get_sb(struct file_system_type *fs_type, int flags,
mutex_unlock
(
&
s
->
s_root
->
d_inode
->
i_mutex
);
mutex_unlock
(
&
s
->
s_root
->
d_inode
->
i_mutex
);
if
(
IS_ERR
(
root
))
{
if
(
IS_ERR
(
root
))
{
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
error
=
PTR_ERR
(
root
);
error
=
PTR_ERR
(
root
);
goto
error_free_subvol_name
;
goto
error_free_subvol_name
;
}
}
if
(
!
root
->
d_inode
)
{
if
(
!
root
->
d_inode
)
{
dput
(
root
);
dput
(
root
);
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
error
=
-
ENXIO
;
error
=
-
ENXIO
;
goto
error_free_subvol_name
;
goto
error_free_subvol_name
;
}
}
...
...
fs/cifs/cifsfs.c
View file @
6f5bbff9
...
@@ -602,8 +602,7 @@ cifs_get_sb(struct file_system_type *fs_type,
...
@@ -602,8 +602,7 @@ cifs_get_sb(struct file_system_type *fs_type,
rc
=
cifs_read_super
(
sb
,
data
,
dev_name
,
flags
&
MS_SILENT
?
1
:
0
);
rc
=
cifs_read_super
(
sb
,
data
,
dev_name
,
flags
&
MS_SILENT
?
1
:
0
);
if
(
rc
)
{
if
(
rc
)
{
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
return
rc
;
return
rc
;
}
}
sb
->
s_flags
|=
MS_ACTIVE
;
sb
->
s_flags
|=
MS_ACTIVE
;
...
...
fs/devpts/inode.c
View file @
6f5bbff9
...
@@ -389,11 +389,10 @@ static int devpts_get_sb(struct file_system_type *fs_type,
...
@@ -389,11 +389,10 @@ static int devpts_get_sb(struct file_system_type *fs_type,
return
0
;
return
0
;
out_dput:
out_dput:
dput
(
s
->
s_root
);
dput
(
s
->
s_root
);
/* undo dget() in simple_set_mnt() */
out_undo_sget:
out_undo_sget:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
return
error
;
return
error
;
}
}
...
...
fs/ecryptfs/main.c
View file @
6f5bbff9
...
@@ -614,9 +614,8 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -614,9 +614,8 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
}
}
goto
out
;
goto
out
;
out_abort:
out_abort:
dput
(
sb
->
s_root
);
dput
(
sb
->
s_root
);
/* aka mnt->mnt_root, as set by get_sb_nodev() */
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
out:
out:
return
rc
;
return
rc
;
}
}
...
...
fs/libfs.c
View file @
6f5bbff9
...
@@ -246,8 +246,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
...
@@ -246,8 +246,7 @@ int get_sb_pseudo(struct file_system_type *fs_type, char *name,
return
0
;
return
0
;
Enomem:
Enomem:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
fs/nfs/super.c
View file @
6f5bbff9
...
@@ -2111,8 +2111,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
...
@@ -2111,8 +2111,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
error_splat_root:
error_splat_root:
dput
(
mntroot
);
dput
(
mntroot
);
error_splat_super:
error_splat_super:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
goto
out
;
goto
out
;
}
}
...
@@ -2208,8 +2207,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -2208,8 +2207,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
return
error
;
return
error
;
error_splat_super:
error_splat_super:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
dprintk
(
"<-- nfs_xdev_get_sb() = %d [splat]
\n
"
,
error
);
dprintk
(
"<-- nfs_xdev_get_sb() = %d [splat]
\n
"
,
error
);
return
error
;
return
error
;
}
}
...
@@ -2469,8 +2467,7 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
...
@@ -2469,8 +2467,7 @@ static int nfs4_get_sb(struct file_system_type *fs_type,
error_splat_root:
error_splat_root:
dput
(
mntroot
);
dput
(
mntroot
);
error_splat_super:
error_splat_super:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
goto
out
;
goto
out
;
}
}
...
@@ -2564,8 +2561,7 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -2564,8 +2561,7 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags,
return
error
;
return
error
;
error_splat_super:
error_splat_super:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
dprintk
(
"<-- nfs4_xdev_get_sb() = %d [splat]
\n
"
,
error
);
dprintk
(
"<-- nfs4_xdev_get_sb() = %d [splat]
\n
"
,
error
);
return
error
;
return
error
;
}
}
...
@@ -2649,8 +2645,7 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -2649,8 +2645,7 @@ static int nfs4_referral_get_sb(struct file_system_type *fs_type, int flags,
return
error
;
return
error
;
error_splat_super:
error_splat_super:
up_write
(
&
s
->
s_umount
);
deactivate_locked_super
(
s
);
deactivate_super
(
s
);
dprintk
(
"<-- nfs4_referral_get_sb() = %d [splat]
\n
"
,
error
);
dprintk
(
"<-- nfs4_referral_get_sb() = %d [splat]
\n
"
,
error
);
return
error
;
return
error
;
}
}
...
...
fs/proc/root.c
View file @
6f5bbff9
...
@@ -67,8 +67,7 @@ static int proc_get_sb(struct file_system_type *fs_type,
...
@@ -67,8 +67,7 @@ static int proc_get_sb(struct file_system_type *fs_type,
sb
->
s_flags
=
flags
;
sb
->
s_flags
=
flags
;
err
=
proc_fill_super
(
sb
);
err
=
proc_fill_super
(
sb
);
if
(
err
)
{
if
(
err
)
{
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
return
err
;
return
err
;
}
}
...
...
fs/ubifs/super.c
View file @
6f5bbff9
...
@@ -2055,8 +2055,7 @@ static int ubifs_get_sb(struct file_system_type *fs_type, int flags,
...
@@ -2055,8 +2055,7 @@ static int ubifs_get_sb(struct file_system_type *fs_type, int flags,
return
0
;
return
0
;
out_deact:
out_deact:
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
out_close:
out_close:
ubi_close_volume
(
ubi
);
ubi_close_volume
(
ubi
);
return
err
;
return
err
;
...
...
kernel/cgroup.c
View file @
6f5bbff9
...
@@ -1133,8 +1133,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
...
@@ -1133,8 +1133,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
free_cg_links:
free_cg_links:
free_cg_links
(
&
tmp_cg_links
);
free_cg_links
(
&
tmp_cg_links
);
drop_new_super:
drop_new_super:
up_write
(
&
sb
->
s_umount
);
deactivate_locked_super
(
sb
);
deactivate_super
(
sb
);
return
ret
;
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