mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
vfs: take mnt_master to struct mount
make IS_MNT_SLAVE take struct mount * at the same time Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
14cf1fa8f5
commit
d10e8def07
4 changed files with 20 additions and 19 deletions
|
@ -715,14 +715,14 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root,
|
|||
|
||||
if (flag & CL_SLAVE) {
|
||||
list_add(&mnt->mnt.mnt_slave, &old->mnt.mnt_slave_list);
|
||||
mnt->mnt.mnt_master = &old->mnt;
|
||||
mnt->mnt_master = &old->mnt;
|
||||
CLEAR_MNT_SHARED(&mnt->mnt);
|
||||
} else if (!(flag & CL_PRIVATE)) {
|
||||
if ((flag & CL_MAKE_SHARED) || IS_MNT_SHARED(&old->mnt))
|
||||
list_add(&mnt->mnt.mnt_share, &old->mnt.mnt_share);
|
||||
if (IS_MNT_SLAVE(&old->mnt))
|
||||
if (IS_MNT_SLAVE(old))
|
||||
list_add(&mnt->mnt.mnt_slave, &old->mnt.mnt_slave);
|
||||
mnt->mnt.mnt_master = old->mnt.mnt_master;
|
||||
mnt->mnt_master = old->mnt_master;
|
||||
}
|
||||
if (flag & CL_MAKE_SHARED)
|
||||
set_mnt_shared(mnt);
|
||||
|
@ -1051,8 +1051,8 @@ static int show_mountinfo(struct seq_file *m, void *v)
|
|||
/* Tagged fields ("foo:X" or "bar") */
|
||||
if (IS_MNT_SHARED(mnt))
|
||||
seq_printf(m, " shared:%i", mnt->mnt_group_id);
|
||||
if (IS_MNT_SLAVE(mnt)) {
|
||||
int master = mnt->mnt_master->mnt_group_id;
|
||||
if (IS_MNT_SLAVE(r)) {
|
||||
int master = r->mnt_master->mnt_group_id;
|
||||
int dom = get_dominating_id(r, &p->root);
|
||||
seq_printf(m, " master:%i", master);
|
||||
if (dom && dom != master)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue