Squashed commit of the following:

commit fe368978dd8fb12d29647e83810d0fa680d1ab4a
Author: David Rientjes <rientjes@google.com>
Date:   Mon Apr 9 16:56:18 2012 -0700

    android, lowmemorykiller: remove task handoff notifier

    The task handoff notifier leaks task_struct since it never gets freed
    after the callback returns NOTIFY_OK, which means it is responsible for
    doing so.

    It turns out the lowmemorykiller actually doesn't need this notifier at
    all.  It's used to prevent unnecessary killing by waiting for a thread
    to exit as a result of lowmem_shrink(), however, it's possible to do
    this in the same way the kernel oom killer works by setting TIF_MEMDIE
    and avoid killing if we're still waiting for it to exit.

    The kernel oom killer will already automatically set TIF_MEMDIE for
    threads that are attempting to allocate memory that have a fatal signal.
    The thread selected by lowmem_shrink() will have such a signal after the
    lowmemorykiller sends it a SIGKILL, so this won't result in an
    unnecessary use of memory reserves for the thread to exit.

    This has the added benefit that we don't have to rely on
    CONFIG_PROFILING to prevent needlessly killing tasks.

    Reported-by: Werner Landgraf <w.landgraf@ru.ru>
    Cc: stable@vger.kernel.org
    Signed-off-by: David Rientjes <rientjes@google.com>
    Acked-by: Colin Cross <ccross@android.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

    Conflicts:

    	drivers/staging/android/lowmemorykiller.c

commit 33685f515bcc4fd3bb8e68fac98741598ffdf912
Merge: 7ac76d1 59bd550
Author: edoko <r_data@naver.com>
Date:   Sun Jul 29 12:29:07 2012 +0900

    Merge branch 'jb' into port

commit 59bd55050007b4f8b97de6d370b7fb686eb74a68
Author: edoko <r_data@naver.com>
Date:   Sun Jul 29 12:27:43 2012 +0900

    Backport ZRAM from Linux 3.2

commit 7ac76d1cfd9dc29aadc8b9c4596b8c0b065b9cbc
Author: Nitin Gupta <ngupta@vflare.org>
Date:   Fri Sep 9 19:01:00 2011 -0400

    zram: Fix sparse warnings

    Fixes sparse warning:
    zram_drv.c:666:6: warning: symbol 'zram_slot_free_notify' was not
    declared. Should it be static?

    Also, max_zpage_size is now size_t just to be consistent with data-type
    of other variables maintaining sizes of various kinds.

    Signed-off-by: Nitin Gupta <ngupta@vflare.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit 428842e18c6ecb8acb7419d9eb4654a756c10224
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Tue Sep 6 15:02:12 2011 +0200

    staging: zram: prevent accessing an unallocated table when init fails early

    When the allocation of zram->table fails, we set zram->disksize to zero
    to prevent accessing the unallocated table entries during cleanup.
    However, we currently don't take this precaution when the initialization
    fails earlier.

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit befe999a57855fb7340f304abe3a145974e46a46
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Tue Sep 6 15:02:11 2011 +0200

    staging: zram: fix zram locking

    Currently init_lock only prevents concurrent execution of zram_init_device()
    and zram_reset_device() but not zram_make_request() nor sysfs store functions.

    This patch changes init_lock into a rw_semaphore. A write lock is taken by
    init, reset and store functions, a read lock is taken by zram_make_request().
    Also, avoids to release the lock before calling __zram_reset_device() for
    cleaning after a failed init, thus preventing any concurrent task to see an
    inconsistent state of zram.

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit 05c1f8b78349ecdae0fe09f688a5dea71cd23e1c
Author: Noah Watkins <noahwatkins@gmail.com>
Date:   Wed Jul 20 17:06:08 2011 -0600

    staging: zram: make global var "num_devices" use unique name

    The global variable "num_devices" is too general to be
    global. This patch switches the name to be "zram_num_devices".

    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit e0834bfc2537ebb1d5c9f23add289271d0b5f981
Author: Noah Watkins <noahwatkins@gmail.com>
Date:   Wed Jul 20 17:05:57 2011 -0600

    staging: zram: make global var "devices" use unique name

    The global variable "devices" is too general to be global.
    This patch switches the name to be "zram_devices".

    Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit fe817b28cdd136e23aec3eef7235218e77e79d8e
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Wed Jul 13 17:20:05 2011 +0200

    Staging: zram: Fix kunmapping order

    This patch fixes the unmapping order of KM_USER0/1 in
    handle_uncompressed_page() and zram_read() so that kmap()/kunmap() calls
    are correctly nested.

    Reported-by: Nitin Gupta <ngupta@vflare.org>
    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Reviewed-by: Nitin Gupta <ngupta@vflare.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit d029f343d4d74715b73112b3d2ee628c33da2176
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Fri Jun 10 15:28:49 2011 +0200

    Staging: zram: Replace mutex lock by a R/W semaphore

    Currently, nothing protects zram table from concurrent access.
    For instance, ZRAM_UNCOMPRESSED bit can be cleared by zram_free_page()
    called from a concurrent write between the time ZRAM_UNCOMPRESSED has
    been set and the time it is tested to unmap KM_USER0 in
    zram_bvec_write(). This ultimately leads to kernel panic.

    Also, a read request can occurs when the page has been freed by a
    running write request and before it has been updated, leading to
    zero filled block being incorrectly read and "Read before write"
    error message.

    This patch replace the current mutex by a rw_semaphore. It extends
    the protection to zram table (currently, only compression buffers are
    protected) and read requests (currently, only write requests are
    protected).

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit a576c9670025a2ccda9c204db4fbc30b9a4b40f4
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Fri Jun 10 15:28:48 2011 +0200

    Staging: zram: allow partial page operations

    Commit 7b19b8d45b216ff3186f066b31937bdbde066f08 (zram: Prevent overflow
    in logical block size) introduced ZRAM_LOGICAL_BLOCK_SIZE constant to
    prevent overflow of logical block size on 64k page kernel.
    However, the current implementation of zram only allow operation on block
    of the same size as a page. That makes theorically legit 4k requests fail
    on 64k page kernel.

    This patch makes zram allow operation on partial pages. Basically, it
    means we still do operations on full pages internally, but only copy the
    relevent segments from/to the user memory.

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit 8abb44ceecd79d452113d4bd1e3d3a0e501bd306
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Fri Jun 10 15:28:47 2011 +0200

    Staging: zram: Refactor zram_read/write() functions

    This patch refactor the code of zram_read/write() functions. It does
    not removes a lot of duplicate code alone, but is mostly a helper for
    the third patch of this series (Staging: zram: allow partial page
    operations).

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

commit 576889e97499a29ecdd1d9dd48a2a595a27da5c5
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Fri Jun 10 15:28:46 2011 +0200

    Staging: zram: Remove useless offset calculation in handle_uncompressed_page()

    The offset of uncompressed page is always zero: handle_uncompressed_page()
    doesn't have to care about it.

    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>