]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix missing increment of bi_remaining
authorMuthu Kumar <muthu.lkml@gmail.com>
Wed, 8 Jan 2014 21:19:52 +0000 (14:19 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 8 Jan 2014 21:19:52 +0000 (14:19 -0700)
commit9dd020c43eac47b798d7d79dbcaabcbf8edbce6e
tree1fac305df2871fdeb16e2ef03d2c39c1d87ba9f5
parent15776a11364f1462e9cb26a9ea986e0fedda4c58
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: Fengguang Wu <fengguang.wu@intel.com>
CC: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Muthukumar Ratty <muthur@gmail.com>
Reviewed-by: Chris Mason <clm@fb.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/volumes.c