Ming Lei 83c9c54716 fs: move guard_bio_eod() after bio_set_op_attrs
Commit 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod")
adds bio_truncate() for handling bio EOD. However, bio_truncate()
doesn't use the passed 'op' parameter from guard_bio_eod's callers.

So bio_trunacate() may retrieve wrong 'op', and zering pages may
not be done for READ bio.

Fixes this issue by moving guard_bio_eod() after bio_set_op_attrs()
in submit_bh_wbc() so that bio_truncate() can always retrieve correct
op info.

Meantime remove the 'op' parameter from guard_bio_eod() because it isn't
used any more.

Cc: Carlos Maiolino <cmaiolino@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Fixes: 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod")
Signed-off-by: Ming Lei <ming.lei@redhat.com>

Fold in kerneldoc and bio_op() change.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-09 08:16:12 -07:00
..
2019-11-25 10:59:41 -08:00
2019-07-09 10:45:06 -07:00
2019-10-07 08:31:59 -06:00
2019-09-19 13:27:23 -07:00
2019-10-07 21:19:10 -06:00
2019-12-03 08:51:24 -07:00
2019-07-15 09:20:27 -03:00
2019-10-07 08:31:59 -06:00