diff options
author | Anay Wadhera <awadhera@berkeley.edu> | 2021-05-21 13:29:12 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:51:15 +0300 |
commit | 3b67371b712b08969c129246e3bcb438d25836b0 (patch) | |
tree | 04b46bb40c6e0fc531450d518bf5c05a41b183b6 /kernel/bpf/syscall.c | |
parent | ca563aa11a35586352fcefe9d7561f5c7e3de981 (diff) |
bpf: move bpf_map_show_fdinfo to match upstream location
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r-- | kernel/bpf/syscall.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index c75236abaa72..4d924d0523f4 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -142,25 +142,6 @@ void bpf_map_put(struct bpf_map *map) } } -#ifdef CONFIG_PROC_FS -static void bpf_map_show_fdinfo(struct seq_file *m, struct file *filp) -{ - const struct bpf_map *map = filp->private_data; - - seq_printf(m, - "map_type:\t%u\n" - "key_size:\t%u\n" - "value_size:\t%u\n" - "max_entries:\t%u\n" - "map_flags:\t%#x\n", - map->map_type, - map->key_size, - map->value_size, - map->max_entries, - map->map_flags); -} -#endif - void bpf_map_put_with_uref(struct bpf_map *map) { bpf_map_put_uref(map); @@ -178,6 +159,25 @@ static int bpf_map_release(struct inode *inode, struct file *filp) return 0; } +#ifdef CONFIG_PROC_FS +static void bpf_map_show_fdinfo(struct seq_file *m, struct file *filp) +{ + const struct bpf_map *map = filp->private_data; + + seq_printf(m, + "map_type:\t%u\n" + "key_size:\t%u\n" + "value_size:\t%u\n" + "max_entries:\t%u\n" + "map_flags:\t%#x\n", + map->map_type, + map->key_size, + map->value_size, + map->max_entries, + map->map_flags); +} +#endif + static const struct file_operations bpf_map_fops = { #ifdef CONFIG_PROC_FS .show_fdinfo = bpf_map_show_fdinfo, |