Messages in this thread | | | Subject | Re: [PATCH RFC 10/10] mm/hugetlb: Comment at rest huge_pte_offset() places | From | Nadav Amit <> | Date | Mon, 31 Oct 2022 22:39:33 -0700 |
| |
On Oct 30, 2022, at 2:30 PM, Peter Xu <peterx@redhat.com> wrote:
> + /* With vma lock held, safe without RCU */ > src_pte = huge_pte_offset(src, addr, sz);
Just another option to consider: you can create an inline function huge_pte_offset_locked_mm(), which would do the lockdep_assert_held_*().
I personally would prefer it, since it would clarify exactly the lock you care about and "make the code document itself”.
| |