summaryrefslogtreecommitdiff
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-08-08 17:16:17 -0700
committerColin Cross <ccross@android.com>2011-08-08 17:16:17 -0700
commit468c64fd402ad29dcc8ffbe5b9efb8acf36c7e55 (patch)
tree03a80f7a55d53243c3a4e125e51290e76bb9e48a /mm/shmem.c
parent9c0f85dc32867c3d0615bcf626321584db801b2f (diff)
parentea0dc0dc1c1dca25e50384e300a528db57ee7de5 (diff)
Merge commit 'v2.6.39.4' into linux-tegra-2.6.39
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index dfc7069102ee..ba12be45cabb 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -916,11 +916,12 @@ static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, s
if (size > ENTRIES_PER_PAGE)
size = ENTRIES_PER_PAGE;
offset = shmem_find_swp(entry, ptr, ptr+size);
+ shmem_swp_unmap(ptr);
if (offset >= 0) {
shmem_dir_unmap(dir);
+ ptr = shmem_swp_map(subdir);
goto found;
}
- shmem_swp_unmap(ptr);
}
}
lost1:
@@ -1100,8 +1101,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;