[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210128071133.60335-25-chaitanya.kulkarni@wdc.com>
Date: Wed, 27 Jan 2021 23:11:23 -0800
From: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
To: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
dm-devel@...hat.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, drbd-dev@...ts.linbit.com,
xen-devel@...ts.xenproject.org, linux-nvme@...ts.infradead.org,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-fscrypt@...r.kernel.org,
jfs-discussion@...ts.sourceforge.net, linux-nilfs@...r.kernel.org,
ocfs2-devel@....oracle.com, linux-pm@...r.kernel.org,
linux-mm@...ck.org
Cc: axboe@...nel.dk, philipp.reisner@...bit.com,
lars.ellenberg@...bit.com, konrad.wilk@...cle.com,
roger.pau@...rix.com, minchan@...nel.org, ngupta@...are.org,
sergey.senozhatsky.work@...il.com, agk@...hat.com,
snitzer@...hat.com, hch@....de, sagi@...mberg.me,
chaitanya.kulkarni@....com, martin.petersen@...cle.com,
viro@...iv.linux.org.uk, tytso@....edu, jaegeuk@...nel.org,
ebiggers@...nel.org, djwong@...nel.org, shaggy@...nel.org,
konishi.ryusuke@...il.com, mark@...heh.com, jlbec@...lplan.org,
joseph.qi@...ux.alibaba.com, damien.lemoal@....com,
naohiro.aota@....com, jth@...nel.org, rjw@...ysocki.net,
len.brown@...el.com, pavel@....cz, akpm@...ux-foundation.org,
hare@...e.de, gustavoars@...nel.org, tiwai@...e.de,
alex.shi@...ux.alibaba.com, asml.silence@...il.com,
ming.lei@...hat.com, tj@...nel.org, osandov@...com,
bvanassche@....org, jefflexu@...ux.alibaba.com
Subject: [RFC PATCH 24/34] fs/nilfs: use bio_new nilfs_alloc_seg_bio
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
---
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
Powered by blists - more mailing lists