summaryrefslogtreecommitdiff
path: root/kernel/bpf/btf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-09-23 09:35:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-09-23 09:35:36 -0700
commitf8ffbc365f703d74ecca8ca787318d05bbee2bf7 (patch)
treecdb3e023473e02a186b39fe541eb719ed2ffcb7f /kernel/bpf/btf.c
parentf8eb5bd9a818cc5f2a1e50b22b0091830b28cc36 (diff)
parentde12c3391bce10504c0e7bd767516c74110cfce1 (diff)
Merge tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull 'struct fd' updates from Al Viro: "Just the 'struct fd' layout change, with conversion to accessor helpers" * tag 'pull-stable-struct_fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: add struct fd constructors, get rid of __to_fd() struct fd: representation change introduce fd_file(), convert all accessors to it.
Diffstat (limited to 'kernel/bpf/btf.c')
-rw-r--r--kernel/bpf/btf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 8ae092ae1573..83bbf935c562 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -7715,15 +7715,15 @@ struct btf *btf_get_by_fd(int fd)
f = fdget(fd);
- if (!f.file)
+ if (!fd_file(f))
return ERR_PTR(-EBADF);
- if (f.file->f_op != &btf_fops) {
+ if (fd_file(f)->f_op != &btf_fops) {
fdput(f);
return ERR_PTR(-EINVAL);
}
- btf = f.file->private_data;
+ btf = fd_file(f)->private_data;
refcount_inc(&btf->refcnt);
fdput(f);