]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: avoid accessing bvec table directly for a cloned bio
authorMing Lei <ming.lei@redhat.com>
Mon, 18 Dec 2017 12:22:12 +0000 (20:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
commit8ed56d6b6b82443de3192187f2a782b94cc387c4
tree74e6e1b92ce7244ff5a052a7189b9874981164a0
parent35719953a6fc7ea821b639318b28315b71050079
btrfs: avoid accessing bvec table directly for a cloned bio

Commit 7023d1d60f6e8266f741(Btrfs: change how we iterate bios in endio)
mentioned that for dio the submitted bio may be fast cloned, we
can't access the bvec table directly for a cloned bio, so use
bio_get_first_bvec() to retrieve the 1st bvec.

Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Cc: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Acked: David Sterba <dsterba@suse.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/inode.c