Re: [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-03-16 Thread David Sterba
On Fri, Mar 12, 2021 at 12:03:14PM -0800, Ira Weiny wrote: > On Fri, Mar 12, 2021 at 07:58:39PM +0100, David Sterba wrote: > > On Tue, Feb 16, 2021 at 06:48:23PM -0800, ira.we...@intel.com wrote: > > > --- a/fs/btrfs/lzo.c > > > +++ b/fs/btrfs/lzo.c > > > @@ -118,7 +118,7 @@ int

Re: [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-03-12 Thread Ira Weiny
On Fri, Mar 12, 2021 at 07:58:39PM +0100, David Sterba wrote: > On Tue, Feb 16, 2021 at 06:48:23PM -0800, ira.we...@intel.com wrote: > > --- a/fs/btrfs/lzo.c > > +++ b/fs/btrfs/lzo.c > > @@ -118,7 +118,7 @@ int lzo_compress_pages(struct list_head *ws, struct > > address_space *mapping, > >

Re: [PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-03-12 Thread David Sterba
On Tue, Feb 16, 2021 at 06:48:23PM -0800, ira.we...@intel.com wrote: > --- a/fs/btrfs/lzo.c > +++ b/fs/btrfs/lzo.c > @@ -118,7 +118,7 @@ int lzo_compress_pages(struct list_head *ws, struct > address_space *mapping, > struct workspace *workspace = list_entry(ws, struct workspace, list); >

[PATCH 1/4] fs/btrfs: Convert kmap to kmap_local_page() using coccinelle

2021-02-16 Thread ira . weiny
From: Ira Weiny Use a simple coccinelle script to help convert the most common kmap()/kunmap() patterns to kmap_local_page()/kunmap_local(). Note that some kmaps which were caught by this script needed to be handled by hand because of the strict unmapping order of kunmap_local() so they are not