Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274173
b: refs/heads/master
c: 8bdafa3
h: refs/heads/master
i:
  274171: 492bc88
v: v3
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Sep 20, 2011
1 parent df17916 commit c65cea2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a11940978bd598e65996b4f807cf4904793f7025
refs/heads/master: 8bdafa39a47265bc029838b35cc6585f69224afa
12 changes: 6 additions & 6 deletions trunk/arch/powerpc/mm/mmu_context_hash64.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ int use_cop(unsigned long acop, struct mm_struct *mm)
if (!mm || !acop)
return -EINVAL;

/* We need to make sure mm_users doesn't change */
down_read(&mm->mmap_sem);
/* The page_table_lock ensures mm_users won't change under us */
spin_lock(&mm->page_table_lock);
spin_lock(mm->context.cop_lockp);

if (mm->context.cop_pid == COP_PID_NONE) {
Expand All @@ -164,7 +164,7 @@ int use_cop(unsigned long acop, struct mm_struct *mm)

out:
spin_unlock(mm->context.cop_lockp);
up_read(&mm->mmap_sem);
spin_unlock(&mm->page_table_lock);

return ret;
}
Expand All @@ -185,8 +185,8 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
if (WARN_ON_ONCE(!mm))
return;

/* We need to make sure mm_users doesn't change */
down_read(&mm->mmap_sem);
/* The page_table_lock ensures mm_users won't change under us */
spin_lock(&mm->page_table_lock);
spin_lock(mm->context.cop_lockp);

mm->context.acop &= ~acop;
Expand All @@ -213,7 +213,7 @@ void drop_cop(unsigned long acop, struct mm_struct *mm)
}

spin_unlock(mm->context.cop_lockp);
up_read(&mm->mmap_sem);
spin_unlock(&mm->page_table_lock);
}
EXPORT_SYMBOL_GPL(drop_cop);

Expand Down

0 comments on commit c65cea2

Please sign in to comment.