diff options
author | Dave Airlie <airlied@redhat.com> | 2016-05-09 05:49:56 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-05-09 05:49:56 +0200 |
commit | bafb86f5bc3173479002555dea7f31d943b12332 (patch) | |
tree | 6ec94c96460faf782cdb8781339560e13e0918b0 /kernel/bpf/inode.c | |
parent | drm/amdgpu: fix build on aarch64. (diff) | |
parent | Linux 4.6-rc7 (diff) | |
download | linux-bafb86f5bc3173479002555dea7f31d943b12332.tar.xz linux-bafb86f5bc3173479002555dea7f31d943b12332.zip |
Merge tag 'v4.6-rc7' into drm-next
Merge this back as we've built up a fair few conflicts, and I have
some newer trees to pull in.
Diffstat (limited to 'kernel/bpf/inode.c')
-rw-r--r-- | kernel/bpf/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index f2ece3c174a5..8f94ca1860cf 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -31,10 +31,10 @@ static void *bpf_any_get(void *raw, enum bpf_type type) { switch (type) { case BPF_TYPE_PROG: - atomic_inc(&((struct bpf_prog *)raw)->aux->refcnt); + raw = bpf_prog_inc(raw); break; case BPF_TYPE_MAP: - bpf_map_inc(raw, true); + raw = bpf_map_inc(raw, true); break; default: WARN_ON_ONCE(1); @@ -297,7 +297,8 @@ static void *bpf_obj_do_get(const struct filename *pathname, goto out; raw = bpf_any_get(inode->i_private, *type); - touch_atime(&path); + if (!IS_ERR(raw)) + touch_atime(&path); path_put(&path); return raw; |