btrfs: fix missing increment of bi_remaining
In btrfs_end_bio(), we increment bi_remaining if is_orig_bio. If not, we restore the orig_bio but failed to increment bi_remaining for orig_bio, which triggers a BUG_ON later when bio_endio is called. Fix is to increment bi_remaining when we restore the orig bio as well. Reported-by: NFengguang Wu <fengguang.wu@intel.com> CC: Kent Overstreet <kmo@daterainc.com> Signed-off-by: NMuthukumar Ratty <muthur@gmail.com> Reviewed-by: NChris Mason <clm@fb.com> Tested-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NJens Axboe <axboe@kernel.dk>
Showing
想要评论请 注册 或 登录