[PATCH 04/12] mm: add lock release annotation on do_wp_page()

From: Namhyung Kim
Date: Wed Sep 29 2010 - 23:52:11 EST


The do_wp_page() releases @ptl but was missing proper annotation.
Add it. This removes following warnings from sparse:

mm/memory.c:2337:9: warning: context imbalance in 'do_wp_page' - unexpected unlock
mm/memory.c:3142:19: warning: context imbalance in 'handle_mm_fault' - different lock contexts for basic block

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
---
mm/memory.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 219b50a..76fa60e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2107,6 +2107,7 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *page_table, pmd_t *pmd,
spinlock_t *ptl, pte_t orig_pte)
+ __releases(ptl)
{
struct page *old_page, *new_page;
pte_t entry;
--
1.7.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/