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
aba809cf
Commit
aba809cf
authored
Sep 28, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
namespace.c: get rid of mnt_ghosts
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
9559f689
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
18 deletions
+9
-18
fs/mount.h
fs/mount.h
+1
-1
fs/namespace.c
fs/namespace.c
+7
-15
fs/pnode.c
fs/pnode.c
+1
-2
No files found.
fs/mount.h
View file @
aba809cf
...
...
@@ -55,7 +55,7 @@ struct mount {
int
mnt_group_id
;
/* peer group identifier */
int
mnt_expiry_mark
;
/* true if marked for expiry */
int
mnt_pinned
;
int
mnt_ghosts
;
struct
path
mnt_ex_mountpoint
;
};
#define MNT_NS_INTERNAL ERR_PTR(-EINVAL)
/* distinct from any mnt_namespace */
...
...
fs/namespace.c
View file @
aba809cf
...
...
@@ -1136,20 +1136,8 @@ static void namespace_unlock(void)
while
(
!
list_empty
(
&
head
))
{
mnt
=
list_first_entry
(
&
head
,
struct
mount
,
mnt_hash
);
list_del_init
(
&
mnt
->
mnt_hash
);
if
(
mnt_has_parent
(
mnt
))
{
struct
dentry
*
dentry
;
struct
mount
*
m
;
br_write_lock
(
&
vfsmount_lock
);
dentry
=
mnt
->
mnt_mountpoint
;
m
=
mnt
->
mnt_parent
;
mnt
->
mnt_mountpoint
=
mnt
->
mnt
.
mnt_root
;
mnt
->
mnt_parent
=
mnt
;
m
->
mnt_ghosts
--
;
br_write_unlock
(
&
vfsmount_lock
);
dput
(
dentry
);
mntput
(
&
m
->
mnt
);
}
if
(
mnt
->
mnt_ex_mountpoint
.
mnt
)
path_put
(
&
mnt
->
mnt_ex_mountpoint
);
mntput
(
&
mnt
->
mnt
);
}
}
...
...
@@ -1181,8 +1169,12 @@ void umount_tree(struct mount *mnt, int propagate)
p
->
mnt_ns
=
NULL
;
list_del_init
(
&
p
->
mnt_child
);
if
(
mnt_has_parent
(
p
))
{
p
->
mnt_parent
->
mnt_ghosts
++
;
put_mountpoint
(
p
->
mnt_mp
);
/* move the reference to mountpoint into ->mnt_ex_mountpoint */
p
->
mnt_ex_mountpoint
.
dentry
=
p
->
mnt_mountpoint
;
p
->
mnt_ex_mountpoint
.
mnt
=
&
p
->
mnt_parent
->
mnt
;
p
->
mnt_mountpoint
=
p
->
mnt
.
mnt_root
;
p
->
mnt_parent
=
p
;
p
->
mnt_mp
=
NULL
;
}
change_mnt_propagation
(
p
,
MS_PRIVATE
);
...
...
fs/pnode.c
View file @
aba809cf
...
...
@@ -278,8 +278,7 @@ int propagate_mnt(struct mount *dest_mnt, struct mountpoint *dest_mp,
*/
static
inline
int
do_refcount_check
(
struct
mount
*
mnt
,
int
count
)
{
int
mycount
=
mnt_get_count
(
mnt
)
-
mnt
->
mnt_ghosts
;
return
(
mycount
>
count
);
return
mnt_get_count
(
mnt
)
>
count
;
}
/*
...
...
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