|
@@ -3351,7 +3351,7 @@ int in_gate_area_no_task(unsigned long addr)
|
|
|
|
|
|
#endif /* __HAVE_ARCH_GATE_AREA */
|
|
|
|
|
|
-static int follow_pte(struct mm_struct *mm, unsigned long address,
|
|
|
+static int __follow_pte(struct mm_struct *mm, unsigned long address,
|
|
|
pte_t **ptepp, spinlock_t **ptlp)
|
|
|
{
|
|
|
pgd_t *pgd;
|
|
@@ -3388,6 +3388,17 @@ out:
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+static inline int follow_pte(struct mm_struct *mm, unsigned long address,
|
|
|
+ pte_t **ptepp, spinlock_t **ptlp)
|
|
|
+{
|
|
|
+ int res;
|
|
|
+
|
|
|
+ /* (void) is needed to make gcc happy */
|
|
|
+ (void) __cond_lock(*ptlp,
|
|
|
+ !(res = __follow_pte(mm, address, ptepp, ptlp)));
|
|
|
+ return res;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* follow_pfn - look up PFN at a user virtual address
|
|
|
* @vma: memory mapping
|