diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-05 08:56:10 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-05 08:56:10 +0200 |
| commit | de800f290dfaa341f22acac22bc454ea2bbf8f71 (patch) | |
| tree | 02ac02009524e4a8a4c1b169583618690bdd2567 /fs/block_dev.c | |
| parent | bee1f89aad2a51cd3339571bc8eadbb0dc88a683 (diff) | |
| parent | e49d033bddf5b565044e2abe4241353959bc9120 (diff) | |
Merge 5.12-rc6 into usb-next
We want the USB fixes in here as well and it resolves a merge issue with
xhci-mtk.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/block_dev.c')
| -rw-r--r-- | fs/block_dev.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 92ed7d5df677..09d6f7229db9 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -275,6 +275,8 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, bio.bi_opf = dio_bio_write_op(iocb); task_io_account_write(ret); } + if (iocb->ki_flags & IOCB_NOWAIT) + bio.bi_opf |= REQ_NOWAIT; if (iocb->ki_flags & IOCB_HIPRI) bio_set_polled(&bio, iocb); @@ -428,6 +430,8 @@ static ssize_t __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, bio->bi_opf = dio_bio_write_op(iocb); task_io_account_write(bio->bi_iter.bi_size); } + if (iocb->ki_flags & IOCB_NOWAIT) + bio->bi_opf |= REQ_NOWAIT; dio->size += bio->bi_iter.bi_size; pos += bio->bi_iter.bi_size; @@ -1240,13 +1244,13 @@ int bdev_disk_changed(struct block_device *bdev, bool invalidate) lockdep_assert_held(&bdev->bd_mutex); - clear_bit(GD_NEED_PART_SCAN, &bdev->bd_disk->state); - rescan: ret = blk_drop_partitions(bdev); if (ret) return ret; + clear_bit(GD_NEED_PART_SCAN, &disk->state); + /* * Historically we only set the capacity to zero for devices that * support partitions (independ of actually having partitions created). |
