Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252747
b: refs/heads/master
c: 139f37f
h: refs/heads/master
i:
  252745: 22024e0
  252743: ee83f28
v: v3
  • Loading branch information
Linus Torvalds committed May 29, 2011
1 parent 4c8a909 commit 3d2746f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 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: c320afe965bf3f857249d223801d8f2fc95615c2
refs/heads/master: 139f37f5e14cd883eee2a8a36289f544b5390a44
5 changes: 0 additions & 5 deletions trunk/drivers/scsi/scsi_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,6 @@ static ssize_t proc_scsi_write(struct file *file, const char __user *buf,
return err;
}

/**
* proc_scsi_show - show contents of /proc/scsi/scsi (attached devices)
* @s: output goes here
* @p: not used
*/
static int always_match(struct device *dev, void *data)
{
return 1;
Expand Down
17 changes: 10 additions & 7 deletions trunk/mm/rmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ struct anon_vma *page_get_anon_vma(struct page *page)
struct anon_vma *page_lock_anon_vma(struct page *page)
{
struct anon_vma *anon_vma = NULL;
struct anon_vma *root_anon_vma;
unsigned long anon_mapping;

rcu_read_lock();
Expand All @@ -415,13 +416,15 @@ struct anon_vma *page_lock_anon_vma(struct page *page)
goto out;

anon_vma = (struct anon_vma *) (anon_mapping - PAGE_MAPPING_ANON);
if (mutex_trylock(&anon_vma->root->mutex)) {
root_anon_vma = ACCESS_ONCE(anon_vma->root);
if (mutex_trylock(&root_anon_vma->mutex)) {
/*
* If we observe a !0 refcount, then holding the lock ensures
* the anon_vma will not go away, see __put_anon_vma().
* If the page is still mapped, then this anon_vma is still
* its anon_vma, and holding the mutex ensures that it will
* not go away, see __put_anon_vma().
*/
if (!atomic_read(&anon_vma->refcount)) {
anon_vma_unlock(anon_vma);
if (!page_mapped(page)) {
mutex_unlock(&root_anon_vma->mutex);
anon_vma = NULL;
}
goto out;
Expand Down Expand Up @@ -1014,7 +1017,7 @@ void do_page_add_anon_rmap(struct page *page,
return;

VM_BUG_ON(!PageLocked(page));
VM_BUG_ON(address < vma->vm_start || address >= vma->vm_end);
/* address might be in next vma when migration races vma_adjust */
if (first)
__page_set_anon_rmap(page, vma, address, exclusive);
else
Expand Down Expand Up @@ -1709,7 +1712,7 @@ void hugepage_add_anon_rmap(struct page *page,

BUG_ON(!PageLocked(page));
BUG_ON(!anon_vma);
BUG_ON(address < vma->vm_start || address >= vma->vm_end);
/* address might be in next vma when migration races vma_adjust */
first = atomic_inc_and_test(&page->_mapcount);
if (first)
__hugepage_set_anon_rmap(page, vma, address, 0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,8 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
delete_from_page_cache(page);
shmem_swp_set(info, entry, swap.val);
shmem_swp_unmap(entry);
spin_unlock(&info->lock);
swap_shmem_alloc(swap);
spin_unlock(&info->lock);
BUG_ON(page_mapped(page));
swap_writepage(page, wbc);
return 0;
Expand Down

0 comments on commit 3d2746f

Please sign in to comment.