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: <CAOi1vP-HNmphq-_KakcGnmGYDY3rWbqmu0vWWS9vmYMLxgj1DQ@mail.gmail.com>
Date:   Fri, 3 Feb 2023 18:14:21 +0100
From:   Ilya Dryomov <idryomov@...il.com>
To:     Christoph Hellwig <hch@....de>
Cc:     Jens Axboe <axboe@...nel.dk>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Minchan Kim <minchan@...nel.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Keith Busch <kbusch@...nel.org>,
        Sagi Grimberg <sagi@...mberg.me>,
        Chaitanya Kulkarni <kch@...dia.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        David Howells <dhowells@...hat.com>,
        Marc Dionne <marc.dionne@...istor.com>,
        Xiubo Li <xiubli@...hat.com>, Steve French <sfrench@...ba.org>,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        Anna Schumaker <anna@...nel.org>,
        Mike Marshall <hubcap@...ibond.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Chuck Lever <chuck.lever@...cle.com>,
        linux-block@...r.kernel.org, ceph-devel@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        linux-nvme@...ts.infradead.org, linux-scsi@...r.kernel.org,
        target-devel@...r.kernel.org, kvm@...r.kernel.org,
        netdev@...r.kernel.org, linux-afs@...ts.infradead.org,
        linux-cifs@...r.kernel.org, samba-technical@...ts.samba.org,
        linux-fsdevel@...r.kernel.org, linux-nfs@...r.kernel.org,
        devel@...ts.orangefs.org, io-uring@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH 12/23] ceph: use bvec_set_page to initialize a bvec

On Fri, Feb 3, 2023 at 4:07 PM Christoph Hellwig <hch@....de> wrote:
>
> Use the bvec_set_page helper to initialize a bvec.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  fs/ceph/file.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 764598e1efd91f..90b2aa7963bf29 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -103,14 +103,10 @@ static ssize_t __iter_get_bvecs(struct iov_iter *iter, size_t maxsize,
>                 size += bytes;
>
>                 for ( ; bytes; idx++, bvec_idx++) {
> -                       struct bio_vec bv = {
> -                               .bv_page = pages[idx],
> -                               .bv_len = min_t(int, bytes, PAGE_SIZE - start),
> -                               .bv_offset = start,
> -                       };
> -
> -                       bvecs[bvec_idx] = bv;
> -                       bytes -= bv.bv_len;
> +                       int len = min_t(int, bytes, PAGE_SIZE - start);
> +
> +                       bvec_set_page(&bvecs[bvec_idx], pages[idx], len, start);
> +                       bytes -= len;
>                         start = 0;
>                 }
>         }
> --
> 2.39.0
>

Reviewed-by: Ilya Dryomov <idryomov@...il.com>

Thanks,

                Ilya

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ