mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
bcache: use bio cloning for detached device requests
[ Upstream commit3ef825dfd4] Previously, bcache hijacked the bi_end_io and bi_private fields of the incoming bio when the backing device was in a detached state. This is fragile and breaks if the bio is needed to be processed by other layers. This patch transitions to using a cloned bio embedded within a private structure. This ensures the original bio's metadata remains untouched. Fixes:53280e3984("bcache: fix improper use of bi_end_io") Co-developed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn> Acked-by: Coly Li <colyli@fnnas.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Stable-dep-of:4da7c5c3ec("bcache: fix I/O accounting leak in detached_dev_do_request") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
db6e287bd6
commit
7b72d76a58
3 changed files with 54 additions and 46 deletions
Loading…
Add table
Add a link
Reference in a new issue