diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-09-27 11:06:46 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-09-27 11:06:46 +1000 |
| commit | bf78296ab1cb215d0609ac6cff4e43e941e51265 (patch) | |
| tree | a193615b327d9ee538e71ca5f13bbfb4f3db4e6b /block/bio.c | |
| parent | 18eb2f6e19d77900695987e3a2b775cccbe5b84e (diff) | |
| parent | 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff) | |
BackMerge v4.19-rc5 into drm-next
Sean Paul requested an -rc5 backmerge from some sun4i fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'block/bio.c')
| -rw-r--r-- | block/bio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/bio.c b/block/bio.c index b12966e415d3..0093bed81c0e 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1684,7 +1684,7 @@ void generic_end_io_acct(struct request_queue *q, int req_op, const int sgrp = op_stat_group(req_op); int cpu = part_stat_lock(); - part_stat_add(cpu, part, ticks[sgrp], duration); + part_stat_add(cpu, part, nsecs[sgrp], jiffies_to_nsecs(duration)); part_round_stats(q, cpu, part); part_dec_in_flight(q, part, op_is_write(req_op)); @@ -2015,7 +2015,8 @@ int bio_associate_blkg(struct bio *bio, struct blkcg_gq *blkg) { if (unlikely(bio->bi_blkg)) return -EBUSY; - blkg_get(blkg); + if (!blkg_try_get(blkg)) + return -ENODEV; bio->bi_blkg = blkg; return 0; } |
