On 9/8/21 6:38 PM, Matthew Wilcox wrote:
On Wed, Sep 08, 2021 at 03:44:38PM -0700, Yonghong Song wrote:
+extern struct vm_area_struct * find_vma_non_owner(struct mm_struct * mm,
+ unsigned long addr);
- extern is deprecated
- no space between the '*' and 'mm'.
- no space between the '*' and the function name.
+struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
+{
+ lockdep_assert_held(&mm->mmap_lock);
+ return find_vma_non_owner(mm, addr);
+}
+
EXPORT_SYMBOL(find_vma);
No blank line between the closing '}' and the EXPORT_SYMBOL.
Thanks for your comment. I just followed the original coding style for
the above change. BTW, I will have a new version anyway so I won't
touch the above code any more.