mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 06:52:07 +00:00
vfs: spread struct mount - tree_contains_unbindable
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
0fb54e5056
commit
cbbe362cd6
1 changed files with 3 additions and 3 deletions
|
@ -1845,10 +1845,10 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int tree_contains_unbindable(struct vfsmount *mnt)
|
static inline int tree_contains_unbindable(struct mount *mnt)
|
||||||
{
|
{
|
||||||
struct mount *p;
|
struct mount *p;
|
||||||
for (p = real_mount(mnt); p; p = next_mnt(p, mnt)) {
|
for (p = mnt; p; p = next_mnt(p, &mnt->mnt)) {
|
||||||
if (IS_MNT_UNBINDABLE(&p->mnt))
|
if (IS_MNT_UNBINDABLE(&p->mnt))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1902,7 +1902,7 @@ static int do_move_mount(struct path *path, char *old_name)
|
||||||
* mount which is shared.
|
* mount which is shared.
|
||||||
*/
|
*/
|
||||||
if (IS_MNT_SHARED(path->mnt) &&
|
if (IS_MNT_SHARED(path->mnt) &&
|
||||||
tree_contains_unbindable(old_path.mnt))
|
tree_contains_unbindable(old))
|
||||||
goto out1;
|
goto out1;
|
||||||
err = -ELOOP;
|
err = -ELOOP;
|
||||||
for (p = path->mnt; mnt_has_parent(p); p = p->mnt_parent)
|
for (p = path->mnt; mnt_has_parent(p); p = p->mnt_parent)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue