euleros/rtos inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4LOJ6 CVE: NA
--------------------------------
This patch set introduce many conflicts while backporting mainline bcache patches, revert it temporarily.
This reverts commit 4c16a43925eb20c4e450fa57cea46fd47042eb36.
Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/md/bcache/request.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index d0999a56bcae..66605e7dcc42 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -1252,13 +1252,14 @@ blk_qc_t cached_dev_submit_bio(struct bio *bio) } else { s->iop.bypass = check_should_bypass(dc, bio);
- s->smp.offset = bio->bi_iter.bi_sector - dc->sb.data_offset; - s->smp.length = bio->bi_iter.bi_size; - s->smp.type = rw; - s->smp.dev = dc->bdev->bd_dev; - s->smp.start_time = ktime_get_ns(); - if (!s->iop.bypass && bio->bi_iter.bi_size && !rw) + if (!s->iop.bypass && bio->bi_iter.bi_size && !rw) { + s->smp.offset = bio->bi_iter.bi_sector - dc->sb.data_offset; + s->smp.length = bio->bi_iter.bi_size; + s->smp.type = rw; + s->smp.dev = dc->bdev->bd_dev; + s->smp.start_time = ktime_get_ns(); save_circ_item(&s->smp); + }
if (rw) cached_dev_write(dc, s);