[Devel] [PATCH hci-8.2 v2 5/6] fs: keep the mount relaxations of a pseudosuper VE from container binaries
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Nov 17 13:33:01 MSK 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ve: stale comment and redundant ve_is_super() in
ve_try_reserve_mount()
--
commit d4e71dc38fde8afad24f03dceda38eb1041883d9
Author: Mirian Shilakadze <mirian.shilakadze at virtuozzo.com>
fs: keep the mount relaxations of a pseudosuper VE from container binaries
The commit limits the device mount option filter relaxation to setup tasks of a pseudosuper VE. It limits the VE mount limit relaxation to setup tasks and to host tasks that joined the VE after it started. It adds ve_current_is_host_task() to identify the second kind of task.
> diff --git a/fs/namespace.c b/fs/namespace.c
> index d622d9b72d32..fd6ef93ed403 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
[ ... ]
> @@ -3367,7 +3367,7 @@ int ve_devmnt_verify(struct ve_struct *ve, dev_t dev, char *opts, bool new_mount
>
> static inline int ve_try_reserve_mount(struct ve_struct *ve)
> {
> - int ret = ve_is_super(ve) || ve->is_pseudosuper ||
> + int ret = ve_is_super(ve) || ve_current_is_host_task(ve) ||
> ve_is_super(get_exec_env());
> /* Ignore limits in ve0 and pseudosuper cases, but still count. */
> if (ret)
[Severity: Low]
This isn't a bug, but the comment below the condition still says limits are ignored in "pseudosuper cases". Now only setup tasks and late-joining host tasks of a pseudosuper VE skip the limit, so the comment describes the old behaviour. Could it be updated?
Also, ve_current_is_host_task() already returns true for ve0 through ve_current_is_pseudosuper(). The leading ve_is_super(ve) term is therefore redundant and can be dropped.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261117101329.225854-1-mirian.shilakadze@virtuozzo.com?part=5
More information about the Devel
mailing list