Commit 8b338579 authored by David Stevens's avatar David Stevens Committed by Richard Fung
Browse files

CHROMIUM: virtio_blk: fix incorrect container_of



Pass the virtio_blk ptr directly to virtblk_setup_cmd and read the
virtio_device from that pointer, rather than trying to use container_of
to go the other direction.

This fixes an incorrect usage of the container_of introduced by
7c6c7d6b7dc8. The container_of macro should be given a pointer to a
nested struct, but it was instead given a pointer to a function
parameter. Things happens to work if compiled with clang, perhaps due to
inlining, but if compiled with then the BUG_ON is always triggered.

The original ANDROID patch has been upstreamed in 5.17.

BUG=None
TEST=make vmlinux; rsync; arc.Boot.vm
TEST=emerge and deploy arcvm-kernel-ack-5_10; arc.Boot.vm

Change-Id: Ibb4866448a13592317a4b153172f1eb664241988
Signed-off-by: default avatarDavid Stevens <stevensd@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4170283


Reviewed-by: default avatarSuleiman Souhlal <suleiman@chromium.org>
Signed-off-by: default avatarRichard Fung <richardfung@google.com>
parent ef7aba6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment