mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]>
Cc: [email protected]
Fixes: 85a8ce62c2ea ("block: add bio_truncate to fix guard_bio_eod")
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fold in kerneldoc and bio_op() change.
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
80a332f418
commit
3fe209c843
4 changed files with 17 additions and 7 deletions
|
|
@ -62,7 +62,7 @@ static struct bio *mpage_bio_submit(int op, int op_flags, struct bio *bio)
|
|||
{
|
||||
bio->bi_end_io = mpage_end_io;
|
||||
bio_set_op_attrs(bio, op, op_flags);
|
||||
guard_bio_eod(op, bio);
|
||||
guard_bio_eod(bio);
|
||||
submit_bio(bio);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue