[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 24/34] fs/nilfs: use bio_new nilfs_alloc_seg_bio
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, 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
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:23 -0800
- Cc: axboe@xxxxxxxxx, philipp.reisner@xxxxxxxxxx, lars.ellenberg@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, roger.pau@xxxxxxxxxx, minchan@xxxxxxxxxx, ngupta@xxxxxxxxxx, sergey.senozhatsky.work@xxxxxxxxx, agk@xxxxxxxxxx, snitzer@xxxxxxxxxx, hch@xxxxxx, sagi@xxxxxxxxxxx, chaitanya.kulkarni@xxxxxxx, martin.petersen@xxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, tytso@xxxxxxx, jaegeuk@xxxxxxxxxx, ebiggers@xxxxxxxxxx, djwong@xxxxxxxxxx, shaggy@xxxxxxxxxx, konishi.ryusuke@xxxxxxxxx, mark@xxxxxxxxxx, jlbec@xxxxxxxxxxxx, joseph.qi@xxxxxxxxxxxxxxxxx, damien.lemoal@xxxxxxx, naohiro.aota@xxxxxxx, jth@xxxxxxxxxx, rjw@xxxxxxxxxxxxx, len.brown@xxxxxxxxx, pavel@xxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, hare@xxxxxxx, gustavoars@xxxxxxxxxx, tiwai@xxxxxxx, alex.shi@xxxxxxxxxxxxxxxxx, asml.silence@xxxxxxxxx, ming.lei@xxxxxxxxxx, tj@xxxxxxxxxx, osandov@xxxxxx, bvanassche@xxxxxxx, jefflexu@xxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 28 Jan 2021 07:15:06 +0000
- Ironport-sdr: Z5Pu5IFCYXkSshom1iiCgpoCUs78dLPitwcLyKSZ8FrGoj7fjZsjUc2LDUsvhz5qfONN/TPDgC 2bJ25Hul/NR1CppuWgUR7yB+TSxYPSXqR4J5XwbsgbdQnAMVTboNqiFOQUv/BZpmjWNBS0bFCQ hf8rS97Jor6uX+rytS6e9CVLJ88Xl55IFrwl+hUcMJphgOwJNjUBVrHgO7vdX2ngTnGzwWGBcV qFt2xiKjXw3OBW8KQI2QwNWI/X2wsNUYF/4KdhZ2IanlxaEyJj7/PVsGH5ELjnTM+Utn0xUKGb PNI=
- Ironport-sdr: qt6uqyl+nyhvkzSlBF0UfG9XFFoOXcQij6f+Pgod2v9ir5/eLsSIoYaPnFPnbxUlBn9VUdoRED 79PgF/GbNJxMwwJpp4ICRFwu2Ga2z3tPPNKgWSb+c7RR6W3SavfK2leS9SeR3OPRg/A4FjtT6R Gk9MyKLceK+JzfMX2gvFGZEXxVpzHqCx0M60n6mvO5Sl6k/F4TZqsMe2ErKwnIxDLfsI81nq2m uGsfFFtzoti9NgI2Jfm8fbweiIPQrUOM1cEqtt8A+BIJVhhooc6iJeLSIn9Zlzeal+kxxs3Q1p hs5Z16QWPKoipZC9IVPItcoq
- Ironport-sdr: RvbuIrKpOmmqZ+oQPbnvg4P9b6yDctCj11PDSHseFUe3NzGe7aNswGzNT7aYrNNymGc7RRLBwA EyS5TC5ya2f1DBzchV289rrRJN4G30R6UcKQHWHLCT1EqyVYm8BdK2p8B74xj927ubYpSXJJYX yqNCzY6cgWt8a45E/OUvNDiMBg+lmhS8FA2ZqgTfl/62S3ZiS0x0JS7q7oikS9hfGQV2kW1Mb+ vR4fnDhlmPbHKapqq2eTmDAeG1Ipck513pFwPBeDtMk5IkG3qgl83KvWp5povuzxSWxrnJjDon 5kw=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
fs/nilfs2/segbuf.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c
index 1e75417bfe6e..df352cab7a93 100644
--- a/fs/nilfs2/segbuf.c
+++ b/fs/nilfs2/segbuf.c
@@ -383,15 +383,9 @@ static int nilfs_segbuf_submit_bio(struct
nilfs_segment_buffer *segbuf,
static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start,
int nr_vecs)
{
- struct bio *bio;
+ sector_t sect = start << (nilfs->ns_blocksize_bits - 9);
- bio = bio_alloc(GFP_NOIO, nr_vecs);
- if (likely(bio)) {
- bio_set_dev(bio, nilfs->ns_bdev);
- bio->bi_iter.bi_sector =
- start << (nilfs->ns_blocksize_bits - 9);
- }
- return bio;
+ return bio_new(nilfs->ns_bdev, sect, 0, 0, nr_vecs, GFP_NOIO);
}
static void nilfs_segbuf_prepare_write(struct nilfs_segment_buffer *segbuf,
--
2.22.1
|