[libvirt PATCH] util: cgroup: remove unused opts in virCgroupV2BindMount

Ján Tomko posted 1 patch 3 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/da8d06b0a5ef5b30a11b51e5c0c4b091b985f51d.1596454722.git.jtomko@redhat.com
src/util/vircgroupv2.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
[libvirt PATCH] util: cgroup: remove unused opts in virCgroupV2BindMount
Posted by Ján Tomko 3 years, 8 months ago
In virCgroupV2BindMount there is an unused variable containing
what seem to be tmpfs mount options.

Delete it. Unlike with cgroups v1, we do not create a tmpfs
here.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/util/vircgroupv2.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c
index 80f596542c..bf6b4a298c 100644
--- a/src/util/vircgroupv2.c
+++ b/src/util/vircgroupv2.c
@@ -548,9 +548,8 @@ virCgroupV2KillRecursive(virCgroupPtr group,
 static int
 virCgroupV2BindMount(virCgroupPtr group,
                      const char *oldroot,
-                     const char *mountopts)
+                     const char *mountopts G_GNUC_UNUSED)
 {
-    g_autofree char *opts = NULL;
     g_autofree char *src = NULL;
 
     VIR_DEBUG("Mounting cgroups at '%s'", group->unified.mountPoint);
@@ -561,8 +560,6 @@ virCgroupV2BindMount(virCgroupPtr group,
         return -1;
     }
 
-    opts = g_strdup_printf("mode=755,size=65536%s", mountopts);
-
     src = g_strdup_printf("%s%s", oldroot, group->unified.mountPoint);
 
     if (mount(src, group->unified.mountPoint, "none", MS_BIND, NULL) < 0) {
-- 
2.26.2

Re: [libvirt PATCH] util: cgroup: remove unused opts in virCgroupV2BindMount
Posted by Pavel Hrdina 3 years, 8 months ago
On Mon, Aug 03, 2020 at 01:38:47PM +0200, Ján Tomko wrote:
> In virCgroupV2BindMount there is an unused variable containing
> what seem to be tmpfs mount options.
> 
> Delete it. Unlike with cgroups v1, we do not create a tmpfs
> here.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/util/vircgroupv2.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>

Replying to list as well this time :)