/* Copyright (c) 2016 Sargun Dhillon * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. */ #include #include #include #include "bpf_helpers.h" #include struct bpf_map_def SEC("maps") cgroup_map = { .type = BPF_MAP_TYPE_CGROUP_ARRAY, .key_size = sizeof(u32), .value_size = sizeof(u32), .max_entries = 1, }; struct bpf_map_def SEC("maps") perf_map = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(u32), .value_size = sizeof(u64), .max_entries = 1, }; /* Writes the last PID that called sync to a map at index 0 */ SEC("kprobe/sys_sync") int bpf_prog1(struct pt_regs *ctx) { u64 pid = bpf_get_current_pid_tgid(); int idx = 0; if (!bpf_current_task_under_cgroup(&cgroup_map, 0)) return 0; bpf_map_update_elem(&perf_map, &idx, &pid, BPF_ANY); return 0; } char _license[] SEC("license") = "GPL"; u32 _version SEC("version") = LINUX_VERSION_CODE; ption value='emaclite-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:41:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-27 12:41:46 -0800
commit5906374446386fd16fe562b042429d905d231ec3 (patch)
tree8e8a9f367d1aeba25c644d3fcf096ffc443c4c5a /include/dt-bindings/power/r8a7792-sysc.h
parent2fb78e89405f4321b86274a0c24b30896dd50529 (diff)
parent57b59ed2e5b91e958843609c7884794e29e6c4cb (diff)
Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason: "Some fixes that we've collected from the list. We still have one more pending to nail down a regression in lzo compression, but I wanted to get this batch out the door" * 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: remove ->{get, set}_acl() from btrfs_dir_ro_inode_operations Btrfs: disable xattr operations on subvolume directories Btrfs: remove old tree_root case in btrfs_read_locked_inode() Btrfs: fix truncate down when no_holes feature is enabled Btrfs: Fix deadlock between direct IO and fast fsync btrfs: fix false enospc error when truncating heavily reflinked file
Diffstat (limited to 'include/dt-bindings/power/r8a7792-sysc.h')