From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 54ED642011A for ; Wed, 17 Feb 2021 23:13:39 +0100 (CET) Date: Wed, 17 Feb 2021 23:02:58 +0100 From: Pavel Machek To: Chaitanya Kulkarni Message-ID: <20210217220257.GA10791@amd> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> <20210128071133.60335-30-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <20210128071133.60335-30-chaitanya.kulkarni@wdc.com> Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, gustavoars@kernel.org, sergey.senozhatsky.work@gmail.com, snitzer@redhat.com, tiwai@suse.de, djwong@kernel.org, linux-nvme@lists.infradead.org, philipp.reisner@linbit.com, linux-mm@kvack.org, dm-devel@redhat.com, target-devel@vger.kernel.org, alex.shi@linux.alibaba.com, hch@lst.de, agk@redhat.com, drbd-dev@lists.linbit.com, naohiro.aota@wdc.com, linux-nilfs@vger.kernel.org, sagi@grimberg.me, linux-scsi@vger.kernel.org, mark@fasheh.com, konrad.wilk@oracle.com, osandov@fb.com, ebiggers@kernel.org, xen-devel@lists.xenproject.org, ngupta@vflare.org, len.brown@intel.com, linux-pm@vger.kernel.org, hare@suse.de, ming.lei@redhat.com, linux-block@vger.kernel.org, tj@kernel.org, linux-fscrypt@vger.kernel.org, viro@zeniv.linux.org.uk, jefflexu@linux.alibaba.com, jaegeuk@kernel.org, jlbec@evilplan.org, konishi.ryusuke@gmail.com, bvanassche@acm.org, axboe@kernel.dk, damien.lemoal@wdc.com, tytso@mit.edu, akpm@linux-foundation.org, martin.petersen@oracle.com, joseph.qi@linux.alibaba.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, minchan@kernel.org, linux-fsdevel@vger.kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, ocfs2-devel@oss.oracle.com, roger.pau@citrix.com Subject: Re: [Drbd-dev] [RFC PATCH 29/34] power/swap: use bio_new in hib_submit_io List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! >=20 > diff --git a/kernel/power/swap.c b/kernel/power/swap.c > index c73f2e295167..e92e36c053a6 100644 > --- a/kernel/power/swap.c > +++ b/kernel/power/swap.c > @@ -271,13 +271,12 @@ static int hib_submit_io(int op, int op_flags, pgof= f_t page_off, void *addr, > struct hib_bio_batch *hb) > { > struct page *page =3D virt_to_page(addr); > + sector_t sect =3D page_off * (PAGE_SIZE >> 9); > struct bio *bio; > int error =3D 0; > =20 > - bio =3D bio_alloc(GFP_NOIO | __GFP_HIGH, 1); > - bio->bi_iter.bi_sector =3D page_off * (PAGE_SIZE >> 9); > - bio_set_dev(bio, hib_resume_bdev); > - bio_set_op_attrs(bio, op, op_flags); > + bio =3D bio_new(hib_resume_bdev, sect, op, op_flags, 1, > + GFP_NOIO | __GFP_HIGH); > =20 C function with 6 arguments... dunno. Old version looks comparable or even more readable... Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmAtkpEACgkQMOfwapXb+vL5ywCguk9XRtMJ4/rJgwKlR42qzH7B ww4AoK8H3c5uHgpu/eHAUqpvoYMrxHuL =Rk1V -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--