fs/super.c: sync ro remount after blocking writers

Move sync_filesystem() after sb_prepare_remount_readonly().  If writers
sneak in anywhere from sync_filesystem() to sb_prepare_remount_readonly()
it can cause inodes to be dirtied and writeback to occur well after
sys_mount() has completely successfully.

This was spotted by corrupted ubifs filesystems on reboot, but appears
that it can cause issues with any filesystem using writeback.

CRs-Fixed: 627559
Change-Id: Ib417b59d39210aab2de4e5ae48b18129e8bc3e26
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
CC: Richard Weinberger <richard@nod.at>
Co-authored-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Git-commit: 807612db2f9940b9fa6deaef054eb16d51bd3e00
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
fs/super: cwm loop fix cleanup

Change-Id: I6a5613f5457538d7ff38d3455f1bd5d669835b6a
Drivers: staging: android: Lower the max allowed RAM for logger

Lowered RAM values to get more free RAM:

LOGGER_LOG_MAIN: 2048*1024 -> 64*1024
LOGGER_LOG_EVENTS: 256*1024 -> 32*1024
LOGGER_LOG_RADIO: 1024*1024 -> 32*1024
LOGGER_LOG_SYSTEM: 256*1024 -> 64*1024
LOGGER_LOG_SF: 256*1024 -> 64*1024
drivers/exfat: update to v1.2.5

Change-Id: I94f60a0df205619b50e38bdfdcdccf2bc9119f0a
Small optimizations
1. "STRLEN(path) == 0" -> "*path == '\0'"
2. remove unused variable
3. reduce FILE_ID_T structure size on 32-bit
 platform from 64 to 56 bytes

Change-Id: Iedc031ad4df4ccfb58faaa3fe40035053013cf3e
ksm: Provide support to use deferred timers for scanner thread

KSM thread to scan pages is getting schedule on definite timeout.
That wakes up CPU from idle state and hence may affect the power
consumption. Provide an optional support to use deferred timer
which suites low-power use-cases.

To enable deferred timers,
$ echo 1 > /sys/kernel/mm/ksm/deferred_timer

Change-Id: I07fe199f97fe1f72f9a9e1b0b757a3ac533719e8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
ksm: enable deferred timer

Change-Id: I3e4745206a1333fb67e0473573cc44d78c1895c7