From: Jens Axboe Date: Mon, 28 Aug 2017 19:00:44 +0000 (-0600) Subject: Merge tag 'v4.13-rc7' into for-4.14/block-postmerge X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cd996fb47c360320cf25ac9503c16de085ea9cfc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'v4.13-rc7' into for-4.14/block-postmerge Linux 4.13-rc7 Signed-off-by: Jens Axboe --- cd996fb47c360320cf25ac9503c16de085ea9cfc diff --cc block/bio-integrity.c index 553d75e357b4,9b1ea478577b..5df32907ff3b --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@@ -385,12 -387,11 +385,11 @@@ static void bio_integrity_verify_fn(str */ bool __bio_integrity_endio(struct bio *bio) { - struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); + struct blk_integrity *bi = blk_get_integrity(bio->bi_disk); + struct bio_integrity_payload *bip = bio_integrity(bio); if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && - bi->profile->verify_fn) { - struct bio_integrity_payload *bip = bio_integrity(bio); - + (bip->bip_flags & BIP_BLOCK_INTEGRITY) && bi->profile->verify_fn) { INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); queue_work(kintegrityd_wq, &bip->bip_work); return false; diff --cc mm/page_io.c index 9cf1bc751d79,5f61b54ee1f3..868e7a96bf8a --- a/mm/page_io.c +++ b/mm/page_io.c @@@ -378,7 -379,12 +380,12 @@@ int swap_readpage(struct page *page, bo ret = -ENOMEM; goto out; } - bdev = bio->bi_bdev; + /* + * Keep this task valid during swap readpage because the oom killer may + * attempt to access it in the page fault retry time check. + */ + get_task_struct(current); + disk = bio->bi_disk; bio->bi_private = current; bio_set_op_attrs(bio, REQ_OP_READ, 0); count_vm_event(PSWPIN);