]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY
authorMike Yuan <me@yhndnzj.com>
Tue, 30 Jul 2024 15:45:19 +0000 (17:45 +0200)
committerMike Yuan <me@yhndnzj.com>
Fri, 2 Aug 2024 14:36:07 +0000 (16:36 +0200)
src/shared/cgroup-setup.c

index b1cb47900c6aeea1e05034382c0798c1cf912301..629277736970753518574d20ad85ee22d5521812 100644 (file)
@@ -577,7 +577,7 @@ int cg_set_access_recursive(
         if (r < 0)
                 return r;
 
-        fd = open(fs, O_DIRECTORY|O_CLOEXEC|O_RDONLY);
+        fd = open(fs, O_DIRECTORY|O_CLOEXEC);
         if (fd < 0)
                 return -errno;