Re: [PATCH 1/5] bio: Use memzero_page() in bio_truncate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good cleanup.

Reviewed-by: Alex Markuze amarkuze@xxxxxxxxxx

On Thu, Jun 12, 2025 at 5:35 PM Matthew Wilcox (Oracle)
<willy@xxxxxxxxxxxxx> wrote:
>
> memzero_page() is the new name for zero_user().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> ---
>  block/bio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/bio.c b/block/bio.c
> index 3c0a558c90f5..ce16c34ec6de 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -653,13 +653,13 @@ static void bio_truncate(struct bio *bio, unsigned new_size)
>
>         bio_for_each_segment(bv, bio, iter) {
>                 if (done + bv.bv_len > new_size) {
> -                       unsigned offset;
> +                       size_t offset;
>
>                         if (!truncated)
>                                 offset = new_size - done;
>                         else
>                                 offset = 0;
> -                       zero_user(bv.bv_page, bv.bv_offset + offset,
> +                       memzero_page(bv.bv_page, bv.bv_offset + offset,
>                                   bv.bv_len - offset);
>                         truncated = true;
>                 }
> --
> 2.47.2
>
>






[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux