Ming Lei 3fe209c843 fs: move guard_bio_eod() after bio_set_op_attrs
commit 83c9c547168e8b914ea6398430473a4de68c52cc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Fold in kerneldoc and bio_op() change.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-01-17 19:48:21 +01:00
..
2019-09-27 15:10:34 -07:00
2019-09-19 09:42:37 -07:00
2019-07-12 17:37:53 -07:00
2019-12-17 19:56:43 +01:00
2019-12-13 08:42:31 +01:00
2019-09-19 09:42:37 -07:00
2019-09-19 09:42:37 -07:00
2019-07-03 17:52:09 -04:00
2020-01-09 10:20:02 +01:00
2019-09-19 10:21:35 -07:00
2019-10-19 06:32:32 -04:00
2019-09-19 09:42:37 -07:00
2019-11-29 10:10:10 +01:00
2019-04-08 18:21:02 -05:00
2019-08-07 21:51:47 -04:00
2019-12-17 19:55:30 +01:00
2019-09-18 16:59:14 -07:00
2019-10-14 15:04:01 -07:00
2019-09-18 16:59:14 -07:00
2019-08-01 20:51:23 +02:00