diff --git a/mm/shmem.c b/mm/shmem.c index dfc7069102ee638215d7f494a0893c26e7687325..ba4ad28b7db6b81c141915a5d3eb4241fdbfd1a7 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: