From c48d3f2683c28939b3c11bdfa67e4446cd11beee Mon Sep 17 00:00:00 2001 From: "Martin, Chen" Date: Mon, 14 Jan 2019 17:59:03 +0000 Subject: [PATCH] fix CentOS 7.6 upgrade compile error 1, fix improper call of part_round_stats and part_inc_in_flight in drbd_req.c, as CONFIG_BLK_DEV_DRBD=m defined in kernel-3.10.0-x86_64.config.tis_extra 2, add explicit declaration for trace_bpf_int_jit_compile, trace_bpf_jit_compile, trace_bpf_jit_free, if pmd_read_atomic not defined Signed-off-by: Martin, Chen --- drivers/block/drbd/drbd_req.c | 8 ++++---- include/linux/filter.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index a6f13f7..cbd0a49 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -39,12 +39,12 @@ static void _drbd_start_io_acct(struct drbd_conf *mdev, struct drbd_request *req const int rw = bio_data_dir(req->master_bio); int cpu; cpu = part_stat_lock(); - part_round_stats(cpu, &mdev->vdisk->part0); + part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0); part_stat_inc(cpu, &mdev->vdisk->part0, ios[rw]); part_stat_add(cpu, &mdev->vdisk->part0, sectors[rw], req->i.size >> 9); (void) cpu; /* The macro invocations above want the cpu argument, I do not like the compiler warning about cpu only assigned but never used... */ - part_inc_in_flight(&mdev->vdisk->part0, rw); + part_inc_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw); part_stat_unlock(); } @@ -56,8 +56,8 @@ static void _drbd_end_io_acct(struct drbd_conf *mdev, struct drbd_request *req) int cpu; cpu = part_stat_lock(); part_stat_add(cpu, &mdev->vdisk->part0, ticks[rw], duration); - part_round_stats(cpu, &mdev->vdisk->part0); - part_dec_in_flight(&mdev->vdisk->part0, rw); + part_round_stats(mdev->rq_queue, cpu, &mdev->vdisk->part0); + part_dec_in_flight(mdev->rq_queue, &mdev->vdisk->part0, rw); part_stat_unlock(); } diff --git a/include/linux/filter.h b/include/linux/filter.h index cddbb31..15ce55f 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -763,6 +763,9 @@ void bpf_prog_kallsyms_add(struct bpf_prog *fp); void bpf_prog_kallsyms_del(struct bpf_prog *fp); #else /* CONFIG_BPF_JIT */ +struct bpf_prog * __weak trace_bpf_int_jit_compile(struct bpf_prog *prog); +void __weak trace_bpf_jit_compile(struct bpf_prog *prog); +void __weak trace_bpf_jit_free(struct bpf_prog *fp); static inline bool bpf_prog_ebpf_jited(const struct bpf_prog *fp) { -- 1.8.3.1