Re: [PATCH v2] mm: Add unmap_mapping_pages

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

 



On Tue, Dec 05, 2017 at 07:44:53AM -0800, Matthew Wilcox wrote:
> v2:
>  - Fix inverted mask in dax.c
>  - Pass 'false' instead of '0' for 'only_cows'
>  - nommu definition
> 
> >From ceee2e58548a5264b61000c02371956a1da3bee4 Mon Sep 17 00:00:00 2001
> From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> Date: Tue, 5 Dec 2017 00:15:54 -0500
> Subject: [PATCH] mm: Add unmap_mapping_pages
> 
> Several users of unmap_mapping_range() would much prefer to express
> their range in pages rather than bytes.  Unfortuately, on a 32-bit
> kernel, you have to remember to cast your page number to a 64-bit type
> before shifting it, and four places in the current tree didn't remember
> to do that.  That's a sign of a bad interface.
> 
> Conveniently, unmap_mapping_range() actually converts from bytes into
> pages, so hoist the guts of unmap_mapping_range() into the new function
> unmap_mapping_pages() and convert the callers which want to use pages.
> 
> Signed-off-by: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
> Reported-by: "zhangyi (F)" <yi.zhang@xxxxxxxxxx>

Looks good.  You can add:

Reviewed-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>



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