[RFC PATCH 17/34] iomap: use bio_new in iomap_dio_zero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-fscrypt@xxxxxxxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Subject: [RFC PATCH 17/34] iomap: use bio_new in iomap_dio_zero
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:16 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: B9ndWAvDOT58Vb46vLd1SuXvpNjkCMWolsH/WkCquWFFeLNOGZKoB/qNEUnlSzpS2/FYmqV2HZ Qrpk+/krFtjWWt5GR2cgUVkoDBhyuANsmV8rQXmA4yWPvf2uV8Rg1wW/szHKi4xaEh1qCddArb Ptb3xoSjxHgKZT6Csv4NCqjoKwFvoutYi5tg5ocdgPymsrgmsLQi9ZdNpiIlrX8z2vrffsDuDe omLxYw0ib8KMnyeUzzwM4FJtg8M/mfSzf6dbbqXqAWnUllwM/6CQcQsGd0ZNgcqcgpY+0X2Y0j o9Q=
- Ironport-sdr: EoVw/u6eMCwrRFaD3MQG+hBmC7fivK1rJCn882+bDlhB6R1BOyi14oaoAhOpJcVQP21Ur95YVD 7a0j2DpLKZmxyk0KtanFpyHqaAcS7JzFGEqlV9Sri3yz8bFIoolnO6jCzS0aDsZMkZGseED63F 7jAz0G9ad8dswcozX5Ofuhjk13O1rXgFT/J46UeRGWic9DZUNNWFHiQFmqgaa1hnsAuiTM94qd 6jeit8aCTaO6l1Slfh4nL4211osTc7YUAMSuUJXrh6sdmk3WVv7I4y/Jfls7eaPUNowRY39sHC FeBerITxT5rhACqHZ8xUMx/u
- Ironport-sdr: lKKhoxaMeyOwXqrT2FSzD4wN8uVJ+mvKyFTUKLm7JjK92Do6Pp8LlRaYGgmaQWgAcNgigcbWq0 dr8eH/C5m6jarJyZCPupuIjbqQYzS6I98zkdR7vs+3yNowqMQiZeF1CHZrTo/tpym1SjWfvRXs 6jUItt1/GcDgh349QalPLGcjYuMZ5A1EKw0wTA/1PN33qNlegyypjYwNakr5Qt7Zi77XOTVrdO glPMuXb+RS4OnELTigLzoH/k3P2LKO+/yrMNDKd4LQa/txopqXKI4iyznrBVm1YJBPOgSOjnjZ uxk=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
fs/iomap/direct-io.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index ea1e8f696076..f6c557a1bd25 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -189,15 +189,13 @@ iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos,
int flags = REQ_SYNC | REQ_IDLE;
struct bio *bio;
- bio = bio_alloc(GFP_KERNEL, 1);
- bio_set_dev(bio, iomap->bdev);
- bio->bi_iter.bi_sector = iomap_sector(iomap, pos);
+ bio = bio_new(iomap->bdev, iomap_sector(iomap, pos), REQ_OP_WRITE,
+ flags, 1, GFP_KERNEL);
bio->bi_private = dio;
bio->bi_end_io = iomap_dio_bio_end_io;
get_page(page);
__bio_add_page(bio, page, len, 0);
- bio_set_op_attrs(bio, REQ_OP_WRITE, flags);
iomap_dio_submit_bio(dio, iomap, bio, pos);
}
--
2.22.1
[Index of Archives]
[linux Cryptography]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]