Re: [PATCH] gfs2: Replace deprecated kmap_atomic() by kmap_local_page()

From: Deepak R Varma
Date: Tue Jun 27 2023 - 14:26:20 EST


On Tue, Jun 27, 2023 at 01:11:46PM +0200, Fabio M. De Francesco wrote:
> On domenica 25 giugno 2023 21:23:21 CEST Deepak R Varma wrote:
> > kmap_atomic() is deprecated in favor of kmap_local_{folio,page}().
> >
> > }
> > - p = kmap_atomic(page);
> > + p = kmap_local_page(page);
> > amt = size - copied;
> > if (offset + size > PAGE_SIZE)
> > amt = PAGE_SIZE - offset;
> > memcpy(buf + copied, p + offset, amt);
>
> How about using memcpy_from_page()?

We can do that. I will include that in v3.

Deepak.

>
> Fabio
>
> > - kunmap_atomic(p);
> > + kunmap_local(p);
> > put_page(page);
> > copied += amt;
> > index++;
> > --
> > 2.34.1
>
>
>
>