lkml.org 
[lkml]   [2020]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 7/8] mmap locking API: add MMAP_LOCK_INITIALIZER
On Mon, Apr 6, 2020 at 2:46 AM Laurent Dufour <ldufour@linux.ibm.com> wrote:
>
> Le 26/03/2020 à 08:02, Michel Lespinasse a écrit :
> > Define a new initializer for the mmap locking api.
> > Initially this just evaluates to __RWSEM_INITIALIZER as the API
> > is defined as wrappers around rwsem.
>
> I can't see the benefit of this change.
> The overall idea is to hide the mmap_sem name. Here the macro
> MMAP_LOCK_INITIALIZER() doesn't hide the name.

The idea for the initializer is that it makes it easier to change the
underlying implementation - if we do, we can change the initializer
without having to change every place where it is used. I actually do
that in my other patch series converting the mmap_sem to a range lock.

But you are correct that it does not help with renaming the mmap_sem
field - my next commit in this series still has to do that in every
place this initializer is used.

\
 
 \ /
  Last update: 2020-04-06 15:04    [W:0.048 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site