• Chris Mason's avatar
    md_make_request: don't touch the bio after calling make_request · e91ece55
    Chris Mason authored
    md_make_request was calling bio_sectors() for part_stat_add
    after it was calling the make_request function.  This is
    bad because the make_request function can free the bio and
    because the bi_size field can change around.
    
    The fix here was suggested by Jens Axboe.  It saves the
    sector count before the make_request call.  I hit this
    with CONFIG_DEBUG_PAGEALLOC turned on while trying to break
    his pretty fusionio card.
    
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    e91ece55
md.c 192 KB