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
6758f953
Commit
6758f953
authored
Mar 22, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] mnt_expire is protected by namespace_sem, no need for vfsmount_lock
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c35038be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
fs/namespace.c
fs/namespace.c
+2
-9
No files found.
fs/namespace.c
View file @
6758f953
...
@@ -262,10 +262,8 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
...
@@ -262,10 +262,8 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
/* stick the duplicate mount on the same expiry list
/* stick the duplicate mount on the same expiry list
* as the original if that was on one */
* as the original if that was on one */
if
(
flag
&
CL_EXPIRE
)
{
if
(
flag
&
CL_EXPIRE
)
{
spin_lock
(
&
vfsmount_lock
);
if
(
!
list_empty
(
&
old
->
mnt_expire
))
if
(
!
list_empty
(
&
old
->
mnt_expire
))
list_add
(
&
mnt
->
mnt_expire
,
&
old
->
mnt_expire
);
list_add
(
&
mnt
->
mnt_expire
,
&
old
->
mnt_expire
);
spin_unlock
(
&
vfsmount_lock
);
}
}
}
}
return
mnt
;
return
mnt
;
...
@@ -1127,11 +1125,9 @@ static noinline int do_move_mount(struct nameidata *nd, char *old_name)
...
@@ -1127,11 +1125,9 @@ static noinline int do_move_mount(struct nameidata *nd, char *old_name)
if
(
err
)
if
(
err
)
goto
out1
;
goto
out1
;
spin_lock
(
&
vfsmount_lock
);
/* if the mount is moved, it should no longer be expire
/* if the mount is moved, it should no longer be expire
* automatically */
* automatically */
list_del_init
(
&
old_nd
.
path
.
mnt
->
mnt_expire
);
list_del_init
(
&
old_nd
.
path
.
mnt
->
mnt_expire
);
spin_unlock
(
&
vfsmount_lock
);
out1:
out1:
mutex_unlock
(
&
nd
->
path
.
dentry
->
d_inode
->
i_mutex
);
mutex_unlock
(
&
nd
->
path
.
dentry
->
d_inode
->
i_mutex
);
out:
out:
...
@@ -1198,12 +1194,9 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
...
@@ -1198,12 +1194,9 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
if
((
err
=
graft_tree
(
newmnt
,
nd
)))
if
((
err
=
graft_tree
(
newmnt
,
nd
)))
goto
unlock
;
goto
unlock
;
if
(
fslist
)
{
if
(
fslist
)
/* add to the specified expiration list */
/* add to the specified expiration list */
spin_lock
(
&
vfsmount_lock
);
list_add_tail
(
&
newmnt
->
mnt_expire
,
fslist
);
list_add_tail
(
&
newmnt
->
mnt_expire
,
fslist
);
spin_unlock
(
&
vfsmount_lock
);
}
up_write
(
&
namespace_sem
);
up_write
(
&
namespace_sem
);
return
0
;
return
0
;
...
...
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