diff mbox series

[bpf-next,RESEND] bpf: Use sockfd_put() helper

Message ID 20240830020607.607516-1-ruanjinjie@huawei.com (mailing list archive)
State Superseded
Delegated to: BPF
Headers show
Series [bpf-next,RESEND] bpf: Use sockfd_put() helper | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/apply success Patch already applied to bpf-next-0

Commit Message

Jinjie Ruan Aug. 30, 2024, 2:06 a.m. UTC
Replace fput() with sockfd_put() in bpf_fd_reuseport_array_update_elem().

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
v1-> RESEND
- Use bpf-next instead of -next for commit title prefix.
---
 kernel/bpf/reuseport_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/bpf/reuseport_array.c b/kernel/bpf/reuseport_array.c
index 4b4f9670f1a9..49b8e5a0c6b4 100644
--- a/kernel/bpf/reuseport_array.c
+++ b/kernel/bpf/reuseport_array.c
@@ -308,7 +308,7 @@  int bpf_fd_reuseport_array_update_elem(struct bpf_map *map, void *key,
 
 	spin_unlock_bh(&reuseport_lock);
 put_file:
-	fput(socket->file);
+	sockfd_put(socket);
 	return err;
 }