[Devel] [PATCH rh7 v2 2/2] ve/fs/sync: fix CT's mountpoints traversal
Vladimir Davydov
vdavydov at virtuozzo.com
Thu Feb 25 01:12:41 PST 2016
On Thu, Feb 25, 2016 at 12:00:18PM +0300, Andrey Ryabinin wrote:
...
> diff --git a/fs/sync.c b/fs/sync.c
> index 0eb621f..e38331c 100644
> --- a/fs/sync.c
> +++ b/fs/sync.c
> @@ -129,15 +129,15 @@ static int sync_filesystem_collected(struct list_head *sync_list, struct super_b
>
> static int sync_collect_filesystems(struct ve_struct *ve, struct list_head *sync_list)
> {
> - struct mount *root = real_mount(ve->root_path.mnt);
> struct mount *mnt;
> + struct mnt_namespace *mnt_ns = ve->ve_ns->mnt_ns;
> struct sync_sb *ss;
> int ret = 0;
>
> BUG_ON(!list_empty(sync_list));
>
> down_read(&namespace_sem);
> - for (mnt = root; mnt; mnt = next_mnt(mnt, root)) {
> + list_for_each_entry(mnt, &mnt_ns->list, mnt_list) {
Won't this result in skipping private mounts of sub mount namespaces
inside container?
> if (sync_filesystem_collected(sync_list, mnt->mnt.mnt_sb))
> continue;
>
More information about the Devel
mailing list