• Tejun Heo's avatar
    cgroup: remove "no" prefixed mount options · c808f463
    Tejun Heo authored
    30312730 ("cgroup: Add "no" prefixed mount options") added "no" prefixed
    mount options to allow turning them off and 6a010a49 ("cgroup: Make
    !percpu threadgroup_rwsem operations optional") added one more "no" prefixed
    mount option. However, Michal pointed out that the "no" prefixed options
    aren't necessary in allowing mount options to be turned off:
    
      # grep group /proc/mounts
      cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,relatime,nsdelegate,memory_recursiveprot 0 0
      # mount -o remount,nsdelegate,memory_recursiveprot none /sys/fs/cgroup
      # grep cgroup /proc/mounts
      cgroup2 /sys/fs/cgroup cgroup2 rw,relatime,nsdelegate,memory_recursiveprot 0 0
    
    Note that this is different from the remount behavior when the mount(1) is
    invoked without the device argument - "none":
    
     # grep cgroup /proc/mounts
     cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
     # mount -o remount,nsdelegate,memory_recursiveprot /sys/fs/cgroup
     # grep cgroup /proc/mounts
     cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
    
    While a bit confusing, given that there is a way to turn off the options,
    there's no reason to have the explicit "no" prefixed options. Let's remove
    them.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Cc: Michal Koutný <mkoutny@suse.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    c808f463
cgroup-v2.rst 106 KB