Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210011
b: refs/heads/master
c: aba8a08
h: refs/heads/master
i:
  210009: 58165bd
  210007: a5c3c33
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 25, 2010
1 parent 19452c8 commit fe21f7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 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: f18194275c39835cb84563500995e0d503a32d9a
refs/heads/master: aba8a08ded89a74f1ba04ae94ecc98f26e27d41c
6 changes: 0 additions & 6 deletions trunk/drivers/ata/pata_cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,8 @@ static void cmd64x_set_timing(struct ata_port *ap, struct ata_device *adev, u8 m

if (pair) {
struct ata_timing tp;

ata_timing_compute(pair, pair->pio_mode, &tp, T, 0);
ata_timing_merge(&t, &tp, &t, ATA_TIMING_SETUP);
if (pair->dma_mode) {
ata_timing_compute(pair, pair->dma_mode,
&tp, T, 0);
ata_timing_merge(&tp, &t, &t, ATA_TIMING_SETUP);
}
}
}

Expand Down
19 changes: 3 additions & 16 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void __init anon_vma_init(void)
*/
struct anon_vma *page_lock_anon_vma(struct page *page)
{
struct anon_vma *anon_vma, *root_anon_vma;
struct anon_vma *anon_vma;
unsigned long anon_mapping;

rcu_read_lock();
Expand All @@ -327,21 +327,8 @@ struct anon_vma *page_lock_anon_vma(struct page *page)
goto out;

anon_vma = (struct anon_vma *) (anon_mapping - PAGE_MAPPING_ANON);
root_anon_vma = ACCESS_ONCE(anon_vma->root);
spin_lock(&root_anon_vma->lock);

/*
* If this page is still mapped, then its anon_vma cannot have been
* freed. But if it has been unmapped, we have no security against
* the anon_vma structure being freed and reused (for another anon_vma:
* SLAB_DESTROY_BY_RCU guarantees that - so the spin_lock above cannot
* corrupt): with anon_vma_prepare() or anon_vma_fork() redirecting
* anon_vma->root before page_unlock_anon_vma() is called to unlock.
*/
if (page_mapped(page))
return anon_vma;

spin_unlock(&root_anon_vma->lock);
anon_vma_lock(anon_vma);
return anon_vma;
out:
rcu_read_unlock();
return NULL;
Expand Down

0 comments on commit fe21f7d

Please sign in to comment.