Messages in this thread | | | From | Michel Lespinasse <> | Date | Mon, 20 Apr 2020 17:48:20 -0700 | Subject | Re: [PATCH v4 01/10] mmap locking API: initial implementation as rwsem wrappers |
| |
On Mon, Apr 20, 2020 at 12:51 PM Davidlohr Bueso <dave@stgolabs.net> wrote: > With one observation below. > > >+static inline void mmap_downgrade_write_lock(struct mm_struct *mm) > >+{ > >+ downgrade_write(&mm->mmap_sem); > >+} > > Shouldn't this really be just mmap_downgrade_write()? In locking > normally don't add the _lock at the end as it implies the operation > of acquiring the lock.
Hmmm, I see your point. Actually here the operation is downgrade, so arguably the name should be mmap_write_downgrade ? I'm not sure I like the name though, as it does not make it entirely obvious that the function is a locking primitive.
-- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.
| |