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

Re: [PATCH] xen/blkback: use kmap_local_page()



On Wed, Mar 6, 2024 at 4:41 PM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
>
> On Wed, Mar 06, 2024 at 01:15:48PM +0800, flyingpenghao@xxxxxxxxx wrote:
> > From: Peng Hao <flyingpeng@xxxxxxxxxxx>
> >
> > From: Peng Hao <flyingpeng@xxxxxxxxxxx>
> >
> > Use kmap_local_page() instead of kmap_atomic() which has been
> > deprecated.
> >
> > Signed-off-by: Peng Hao <flyingpeng@xxxxxxxxxxx>
> > ---
> >  drivers/block/xen-blkback/blkback.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/block/xen-blkback/blkback.c 
> > b/drivers/block/xen-blkback/blkback.c
> > index 4defd7f387c7..cce534f43292 100644
> > --- a/drivers/block/xen-blkback/blkback.c
> > +++ b/drivers/block/xen-blkback/blkback.c
> > @@ -937,8 +937,8 @@ static int xen_blkbk_parse_indirect(struct 
> > blkif_request *req,
> >               if ((n % SEGS_PER_INDIRECT_FRAME) == 0) {
> >                       /* Map indirect segments */
> >                       if (segments)
> > -                             kunmap_atomic(segments);
> > -                     segments = 
> > kmap_atomic(pages[n/SEGS_PER_INDIRECT_FRAME]->page);
> > +                             kunmap_local(segments);
> > +                     segments = 
> > kmap_local_page(pages[n/SEGS_PER_INDIRECT_FRAME]->page);
>
> Don't you need to also switch to kunmap_local() then instead of
> kunmap_atomic()?
 kmap_local() and  kunmap_local() are paired.
 I found that I missed a modification, I will re-issue patch v2
 Thanks.
>
> Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.