Squashed update of kernel from 3.4.76 to 3.4.77

Change-Id: Ic21e0c7bf7dc814e777fcd39b3c16b69a1bb978f
(cherry picked from commit fb0e726450a0210d3f0d4c4356ba9b9ec0657c19)
Revert "staging: zram: Add auto loading of module if user opens /dev/zram."

This reverts commit c70bda992c12e593e411c02a52e4bd6985407539.

It's incorrect, Kay writes:
	Please just remove it. "devname" is meant to be used for
	single-instance devices with a static dev_t, never for things
	like zramX.

	It will not do anything useful here, it does nothing really
	without a statically assigned dev_t, and it should not be used
	for devices of this kind anyway.

Change-Id: I30a752a21e87bf0672075b0d37398a7d2e389a48
Reported-by: Tom Gundersen <teg@jklm.no>
Reported-by: Kay Sievers <kay@vrfy.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4291dd3966e3da20a2900f95dd52346d382b13e8)
Staging: zram: Fix access of NULL pointer

commit 46a51c80216cb891f271ad021f59009f34677499 upstream.

This patch fixes the bug in reset_store caused by accessing NULL pointer.

The bdev gets its value from bdget_disk() which could fail when memory
pressure is severe and hence can return NULL because allocation of
inode in bdget could fail.

Hence, this patch introduces a check for bdev to prevent reference to a
NULL pointer in the later part of the code. It also removes unnecessary
check of bdev for fsync_bdev().

Change-Id: Ifbeb2d6ad2153c10a01df053436f310355a398e8
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d8d11ccbba65c0ff1718b599af67cdabc82c4188)
Staging: zram: Fix memory leak by refcount mismatch

commit 1b672224d128ec2570eb37572ff803cfe452b4f7 upstream.

As suggested by Minchan Kim and Jerome Marchand "The code in reset_store
get the block device (bdget_disk()) but it does not put it (bdput()) when
it's done using it. The usage count is therefore incremented but never
decremented."

This patch also puts bdput() for all error cases.

Change-Id: Ia7337e195ad29eaabfb3276583f9992d44dcc278
Acked-by: Minchan Kim <minchan@kernel.org>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c3934e97a4154e193bccc8328a68e8c8dd9f8421)
exFAT: Update to v1.2.5

Change-Id: I6a43a674e5edc599b00a902247539b11569f4e6f
(cherry picked from commit 335417d8d7429eeb3c50e9a8326da3e1404aac4b)
defconfigs: zram updates and regenerate

Change-Id: I69ee693a102247162e4695b806641b7552fa1d8b
(cherry picked from commit b5ad583ab5ae7142ce9b2d07af45055089cec557)
defconfigs: Disable cleancache

Change-Id: Ice9dd3f0b48f973c7e1a032bc25155aaa8298973
(cherry picked from commit 845be7a8b5234fe7839fe5c6e4fd3e374c1ec140)
add extra free kbytes tunable

Add a userspace visible knob to tell the VM to keep an extra amount
of memory free, by increasing the gap between each zone's min and
low watermarks.

This is useful for realtime applications that call system
calls and have a bound on the number of allocations that happen
in any short time period.  In this application, extra_free_kbytes
would be left at an amount equal to or larger than than the
maximum number of allocations that happen in any burst.

It may also be useful to reduce the memory use of virtual
machines (temporarily?), in a way that does not cause memory
fragmentation like ballooning does.

[ccross]
Revived for use on old kernels where no other solution exists.
The tunable will be removed on kernels that do better at avoiding
direct reclaim.

Change-Id: I765a42be8e964bfd3e2886d1ca85a29d60c3bb3e
Signed-off-by: Rik van Riel<riel@redhat.com>
Signed-off-by: Colin Cross <ccross@android.com>
PM / cpufreq: Initialise the cpu field during conservative governor start

This change initialises the cpu id field of cs_cpu_dbs_info structure in
conservative governor and keep this consistent with other governors.
Similar initialisation is present in ondemand governor.

Change-Id: I2806fe15b94e92e160e38fa62172ac0f7ee311f5
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
(cherry picked from commit 0720b53d48f7b32d078a1b9bf24de7238f7a8dfa)
cpufreq: conservative: update frequency when limits are relaxed

Reevaluate CPU load and update frequency immediately whenever limits
are changed. Currently conservative doesn't do that when limits are
relaxed, wasting power on systems with relatively low sampling rate.

Change-Id: I271d36b9c61b2746b035ca5b6214e699c8034d42
Signed-off-by: Michal Pecio <mpecio@nvidia.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
(cherry picked from commit ad1c3a2f43acd7e26881bd941e77a6fb0535f6a9)
defconfigs: Disable NTFS and build exFAT as built-in

 * CM uses ntfs-3g fuse for NTFS.

Change-Id: I0ebb48fd5eef60855a73526d39ca69cb14493e82
(cherry picked from commit 201c11810e8f1f7d56a34f48f764f01ee9eb58dc)
Merge pull request #19 from LegacyXperia/cm-10.2

Latest changes from LX