Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
odroid-linux-3.10.y-rt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
oai
odroid-linux-3.10.y-rt
Commits
0f0afb1d
Commit
0f0afb1d
authored
Nov 24, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vfs: spread struct mount - change_mnt_propagation/set_mnt_shared
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b105e270
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
fs/namespace.c
fs/namespace.c
+4
-4
fs/pnode.c
fs/pnode.c
+6
-6
fs/pnode.h
fs/pnode.h
+4
-4
No files found.
fs/namespace.c
View file @
0f0afb1d
...
...
@@ -724,7 +724,7 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
mnt
->
mnt
.
mnt_master
=
old
->
mnt_master
;
}
if
(
flag
&
CL_MAKE_SHARED
)
set_mnt_shared
(
&
mnt
->
mnt
);
set_mnt_shared
(
mnt
);
/* stick the duplicate mount on the same expiry list
* as the original if that was on one */
...
...
@@ -1239,7 +1239,7 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill)
p
->
mnt
.
mnt_parent
->
mnt_ghosts
++
;
dentry_reset_mounted
(
p
->
mnt
.
mnt_mountpoint
);
}
change_mnt_propagation
(
&
p
->
mnt
,
MS_PRIVATE
);
change_mnt_propagation
(
p
,
MS_PRIVATE
);
}
list_splice
(
&
tmp_list
,
kill
);
}
...
...
@@ -1608,7 +1608,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
if
(
IS_MNT_SHARED
(
dest_mnt
))
{
for
(
p
=
source_mnt
;
p
;
p
=
next_mnt
(
p
,
&
source_mnt
->
mnt
))
set_mnt_shared
(
&
p
->
mnt
);
set_mnt_shared
(
p
);
}
if
(
parent_path
)
{
detach_mnt
(
source_mnt
,
parent_path
);
...
...
@@ -1723,7 +1723,7 @@ static int do_change_type(struct path *path, int flag)
br_write_lock
(
vfsmount_lock
);
for
(
m
=
mnt
;
m
;
m
=
(
recurse
?
next_mnt
(
m
,
&
mnt
->
mnt
)
:
NULL
))
change_mnt_propagation
(
&
m
->
mnt
,
type
);
change_mnt_propagation
(
m
,
type
);
br_write_unlock
(
vfsmount_lock
);
out_unlock:
...
...
fs/pnode.c
View file @
0f0afb1d
...
...
@@ -114,20 +114,20 @@ static int do_make_slave(struct vfsmount *mnt)
/*
* vfsmount lock must be held for write
*/
void
change_mnt_propagation
(
struct
vfs
mount
*
mnt
,
int
type
)
void
change_mnt_propagation
(
struct
mount
*
mnt
,
int
type
)
{
if
(
type
==
MS_SHARED
)
{
set_mnt_shared
(
mnt
);
return
;
}
do_make_slave
(
mnt
);
do_make_slave
(
&
mnt
->
mnt
);
if
(
type
!=
MS_SLAVE
)
{
list_del_init
(
&
mnt
->
mnt_slave
);
mnt
->
mnt_master
=
NULL
;
list_del_init
(
&
mnt
->
mnt
.
mnt
_slave
);
mnt
->
mnt
.
mnt
_master
=
NULL
;
if
(
type
==
MS_UNBINDABLE
)
mnt
->
mnt_flags
|=
MNT_UNBINDABLE
;
mnt
->
mnt
.
mnt
_flags
|=
MNT_UNBINDABLE
;
else
mnt
->
mnt_flags
&=
~
MNT_UNBINDABLE
;
mnt
->
mnt
.
mnt
_flags
&=
~
MNT_UNBINDABLE
;
}
}
...
...
fs/pnode.h
View file @
0f0afb1d
...
...
@@ -23,13 +23,13 @@
#define CL_MAKE_SHARED 0x08
#define CL_PRIVATE 0x10
static
inline
void
set_mnt_shared
(
struct
vfs
mount
*
mnt
)
static
inline
void
set_mnt_shared
(
struct
mount
*
mnt
)
{
mnt
->
mnt_flags
&=
~
MNT_SHARED_MASK
;
mnt
->
mnt_flags
|=
MNT_SHARED
;
mnt
->
mnt
.
mnt
_flags
&=
~
MNT_SHARED_MASK
;
mnt
->
mnt
.
mnt
_flags
|=
MNT_SHARED
;
}
void
change_mnt_propagation
(
struct
vfs
mount
*
,
int
);
void
change_mnt_propagation
(
struct
mount
*
,
int
);
int
propagate_mnt
(
struct
vfsmount
*
,
struct
dentry
*
,
struct
vfsmount
*
,
struct
list_head
*
);
int
propagate_umount
(
struct
list_head
*
);
...
...
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