summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/writeback.h
diff options
context:
space:
mode:
authorZhai Zhaoxuan <kxuanobj@gmail.com>2018-01-08 12:21:27 -0800
committerJens Axboe <axboe@kernel.dk>2018-01-08 13:29:00 -0700
commitb40503ea4f5c134b16ef405cab6c08f9343a0d06 (patch)
tree47101fd3dd2ccb93b13cf7389c00389f24e4a6b7 /drivers/md/bcache/writeback.h
parentce439bf78b4850cadb1e67f0d4a48178d489c75d (diff)
bcache: fix unmatched generic_end_io_acct() & generic_start_io_acct()
The function cached_dev_make_request() and flash_dev_make_request() call generic_start_io_acct() with (struct bcache_device)->disk when they start a closure. Then the function bio_complete() calls generic_end_io_acct() with (struct search)->orig_bio->bi_disk when the closure has done. Since the `bi_disk` is not the bcache device, the generic_end_io_acct() is called with a wrong device queue. It causes the "inflight" (in struct hd_struct) counter keep increasing without decreasing. This patch fix the problem by calling generic_end_io_acct() with (struct bcache_device)->disk. Signed-off-by: Zhai Zhaoxuan <kxuanobj@gmail.com> Reviewed-by: Michael Lyle <mlyle@lyle.org> Reviewed-by: Coly Li <colyli@suse.de> Reviewed-by: Tang Junhui <tang.junhui@zte.com.cn> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/writeback.h')
0 files changed, 0 insertions, 0 deletions