Re: [PATCH v4 10/10] mmap locking API: rename mmap_sem to mmap_lock
From: Daniel Jordan
Date: Mon Apr 20 2020 - 14:28:43 EST
On Tue, Apr 14, 2020 at 05:43:53PM -0700, Michel Lespinasse wrote:
> Rename the mmap_sem field to mmap_lock. Any new uses of this lock
> should now go through the new mmap locking api. The mmap_lock is
> still implemented as a rwsem, though this could change in the future.
There are hundreds of stale 'mmap_sem' comments left after this. What about
adding a wrapper type and leaving the name as is to avoid this? The type is
called something like mmap_sem_struct.
That means the lockdep/might_lock/prefetch/etc calls have to have the
indirection inline, but that seems ok. The main value of the series seems to
be paving the way for instrumentation, not making the type totally abstract.