lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210128071133.60335-5-chaitanya.kulkarni@wdc.com>
Date:   Wed, 27 Jan 2021 23:11:03 -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 04/34] drdb: use bio_new() in submit_one_flush

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
---
 drivers/block/drbd/drbd_receiver.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index e1cd3427b28b..b86bbf725cbd 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1277,8 +1277,10 @@ static void one_flush_endio(struct bio *bio)
 
 static void submit_one_flush(struct drbd_device *device, struct issue_flush_context *ctx)
 {
-	struct bio *bio = bio_alloc(GFP_NOIO, 0);
+	struct block_device *bdev = device->ldev->backing_bdev;
+	struct bio *bio = bio_new(bdev, 0, REQ_OP_FLUSH, REQ_PREFLUSH, 0, GFP_NOIO);
 	struct one_flush_context *octx = kmalloc(sizeof(*octx), GFP_NOIO);
+
 	if (!bio || !octx) {
 		drbd_warn(device, "Could not allocate a bio, CANNOT ISSUE FLUSH\n");
 		/* FIXME: what else can I do now?  disconnecting or detaching
@@ -1296,10 +1298,8 @@ static void submit_one_flush(struct drbd_device *device, struct issue_flush_cont
 
 	octx->device = device;
 	octx->ctx = ctx;
-	bio_set_dev(bio, device->ldev->backing_bdev);
 	bio->bi_private = octx;
 	bio->bi_end_io = one_flush_endio;
-	bio->bi_opf = REQ_OP_FLUSH | REQ_PREFLUSH;
 
 	device->flush_jif = jiffies;
 	set_bit(FLUSH_PENDING, &device->flags);
-- 
2.22.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ