• M
    fs: move guard_bio_eod() after bio_set_op_attrs · 83c9c547
    Ming Lei 提交于
    Commit 85a8ce62 ("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: 85a8ce62 ("block: add bio_truncate to fix guard_bio_eod")
    Signed-off-by: NMing Lei <ming.lei@redhat.com>
    
    Fold in kerneldoc and bio_op() change.
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    83c9c547
bio.c 55.3 KB