From: Andrey Ignatov <rdna@fb.com>
To: <bpf@vger.kernel.org>
Cc: Andrey Ignatov <rdna@fb.com>, <ast@kernel.org>,
<daniel@iogearbox.net>, <kafai@fb.com>, <andriin@fb.com>,
<kernel-team@fb.com>
Subject: [PATCH v2 bpf-next 2/6] bpf: Remove unused new_flags in hierarchy_allows_attach()
Date: Thu, 12 Dec 2019 15:30:49 -0800 [thread overview]
Message-ID: <678caf2c5f76fb9988d32c26a6587769677a648c.1576193131.git.rdna@fb.com> (raw)
In-Reply-To: <cover.1576193131.git.rdna@fb.com>
new_flags is unused, remove it.
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
---
kernel/bpf/cgroup.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index e8cbdd1be687..283efe3ce052 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -103,8 +103,7 @@ static u32 prog_list_length(struct list_head *head)
* if parent has overridable or multi-prog, allow attaching
*/
static bool hierarchy_allows_attach(struct cgroup *cgrp,
- enum bpf_attach_type type,
- u32 new_flags)
+ enum bpf_attach_type type)
{
struct cgroup *p;
@@ -303,7 +302,7 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
/* invalid combination */
return -EINVAL;
- if (!hierarchy_allows_attach(cgrp, type, flags))
+ if (!hierarchy_allows_attach(cgrp, type))
return -EPERM;
if (!list_empty(progs) && cgrp->bpf.flags[type] != flags)
--
2.17.1
next prev parent reply other threads:[~2019-12-12 23:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 23:30 [PATCH v2 bpf-next 0/6] bpf: Support replacing cgroup-bpf program in MULTI mode Andrey Ignatov
2019-12-12 23:30 ` [PATCH v2 bpf-next 1/6] bpf: Simplify __cgroup_bpf_attach Andrey Ignatov
2019-12-12 23:30 ` Andrey Ignatov [this message]
2019-12-12 23:30 ` [PATCH v2 bpf-next 3/6] bpf: Support replacing cgroup-bpf program in MULTI mode Andrey Ignatov
2019-12-12 23:30 ` [PATCH v2 bpf-next 4/6] libbpf: Make DECLARE_LIBBPF_OPTS available in bpf.h Andrey Ignatov
2019-12-13 6:53 ` Andrii Nakryiko
2019-12-12 23:30 ` [PATCH v2 bpf-next 5/6] libbpf: Introduce bpf_prog_attach_xattr Andrey Ignatov
2019-12-13 6:58 ` Andrii Nakryiko
2019-12-13 17:58 ` Andrey Ignatov
2019-12-13 20:42 ` Andrii Nakryiko
2019-12-12 23:30 ` [PATCH v2 bpf-next 6/6] selftests/bpf: Cover BPF_F_REPLACE in test_cgroup_attach Andrey Ignatov
2019-12-13 7:01 ` Andrii Nakryiko
2019-12-18 16:57 ` Andrey Ignatov
2019-12-18 17:24 ` Andrii Nakryiko
2019-12-18 17:37 ` Andrey Ignatov
2019-12-13 5:39 ` [PATCH v2 bpf-next 0/6] bpf: Support replacing cgroup-bpf program in MULTI mode Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=678caf2c5f76fb9988d32c26a6587769677a648c.1576193131.git.rdna@fb.com \
--to=rdna@fb.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).