[RFC PATCH 22/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_readpage
[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 22/34] fs/jfs/jfs_metapage.c: use bio_new in metapage_readpage
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:21 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: YEoIii2ZthT6i7JpK2sMDIzzLD7y9BL2JpCJtQZbh6rT1O4EH4IZb8eA2B3uVQXaGxGzkNsCqd yxyKDdaB7Fpy8udq5g3ElqfqFl5Trm9H6lhrZoOLgv5nPUbMjtgJLnFQLe5pwc34fgRs/GMmvn X+hTp4EKVkdPfyNFhYmdN4E6p6067VtKlF2Qt2zelEv96nVPqSR/XSio14INQoBe1pfvYAH+06 lQOHVOQm5ubDRyfZw8yXjMKkJ7oogNLwgWshyigeu+l3vZ1lf7CsnHwJou+7EgABZUwYKrcwJe fBY=
- Ironport-sdr: Rz0OpD4u8hlapJ5ocF0eqvIRRJvMVQ44nAAhRmQ2oO7zemQbwQZbMR6334NCkNVqX7kWi27Jmx j5lNASgA7NdQQQegJQwcSxiWQr3AM1IEmI7wEN/B3qdZ6Gi89TZkRz7776ovxvXsl7wcLTN0z/ etDxr0f2RpP2xSOaWfwYLf0OYdG/OADnfYUEdBhFYhqLB74sXTyTfLOaUrGBGciSQt8Z3fxbis 71hDmdHVaLQuNz3YfYlh+lzxQqFzcEL1nG0b85GQ9v57QYU/dsN1U8o5seGcHNPpUrwJMOwtt4 y5DFjOhcqQmk41ZrJS+mw9fD
- Ironport-sdr: /NPjYa5/vzKcQxwITziayqgew/xym2P+2wPZ/H6tqOBM0Xhb9g154b50VotcIn3s/gPeO6yJQj jaDu5T7BNEIYITi6TAhnovFoYzPUstLQt0EGdLi5t/kGP6Y/bNfbV9+olcDvctAzlPCNttcR2B XcI2j3jvNIAhA1FsWohm0Q1E2hEvaC5Uto6Y7wmXZKJ1CZQCBzspE+8o3ZgyvyjFSagVsi+kvR d3gH64xpw3ry94057Mia9wtqUGJtdB9qbq+w9vxtVohjFozpBIeHLdl7QNCYcftS3gwSjr5dcQ UPU=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
fs/jfs/jfs_metapage.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 3fa09d9a0b94..c7be3a2773bf 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -495,13 +495,11 @@ static int metapage_readpage(struct file *fp, struct page *page)
if (bio)
submit_bio(bio);
- bio = bio_alloc(GFP_NOFS, 1);
- bio_set_dev(bio, inode->i_sb->s_bdev);
- bio->bi_iter.bi_sector =
- pblock << (inode->i_blkbits - 9);
+ bio = bio_new(inode->i_sb->s_bdev,
+ pblock << (inode->i_blkbits - 9),
+ REQ_OP_READ, 0, 1, GFP_NOFS);
bio->bi_end_io = metapage_read_end_io;
bio->bi_private = page;
- bio_set_op_attrs(bio, REQ_OP_READ, 0);
len = xlen << inode->i_blkbits;
offset = block_offset << inode->i_blkbits;
if (bio_add_page(bio, page, len, offset) < len)
--
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]