Fix copmilation after importing Pantech source
tmpfs: fix shared mempolicy leak

commit 18a2f371f5edf41810f6469cb9be39931ef9deb9 upstream.

This fixes a regression in 3.7-rc, which has since gone into stable.

Commit 00442ad04a5e ("mempolicy: fix a memory corruption by refcount
imbalance in alloc_pages_vma()") changed get_vma_policy() to raise the
refcount on a shmem shared mempolicy; whereas shmem_alloc_page() went
on expecting alloc_page_vma() to drop the refcount it had acquired.
This deserves a rework: but for now fix the leak in shmem_alloc_page().

Hugh: shmem_swapin() did not need a fix, but surely it's clearer to use
the same refcounting there as in shmem_alloc_page(), delete its onstack
mempolicy, and the strange mpol_cond_copy() and __mpol_cond_copy() -
those were invented to let swapin_readahead() make an unknown number of
calls to alloc_pages_vma() with one mempolicy; but since 00442ad04a5e,
alloc_pages_vma() has kept refcount in balance, so now no problem.

Reported-and-tested-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Conflicts:
	mm/shmem.c
Lib: memcopy.c Tweaks and alterations

Conflicts:
	lib/Makefile
mm: Reduce writeback start percentage limit
mm: An attempt to disable swappiness
mm: Increase readahead max and min to 1024 and 32 kbytes accordingly
set LOAD_FREQ to (4*HZ+61)
mach-msm/acpuclock-8960.c: Add 192 Mhz CPU freq step
mach-msm/acpuclock-8960.c: Boost FSB clocks
mach-msm/acpuclock-8960.c: Boost L2 frequencies
mach-msm/acpuclock-8960.c: Change min and max voltages limits
Make vfs_cache_pressure configurable
optimize slack
aio.c: Asynchronous I/O latency to a solid-state disk greatly increased
Fix rq->cpu_load[] calculations
Add optimized AES and SHA1 routines
JIT compiler for packet filters, ARM: net
Do not kill kernel threads
clock wrap bug
I/O-less dirty throttling

Conflicts:

	arch/arm/boot/compressed/piggy.xzkern

Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>

Conflicts:
	mm/vmscan.c