zram: use atomic64_xxx() to replace zram_stat64_xxx()
authorJiang Liu <liuj97@gmail.com>
Thu, 6 Jun 2013 16:07:31 +0000 (00:07 +0800)
committerAlex Shi <alex.shi@linaro.org>
Mon, 11 May 2015 08:16:26 +0000 (16:16 +0800)
commitdc18dd5cb1f638af5fc0328677b5d96328769ca3
tree12bcf515cc8ad876d54c80bd4a6b03d438cddaa8
parent728260fce381aa3a2b10a35d7ab727f9761f58bd
zram: use atomic64_xxx() to replace zram_stat64_xxx()

Use atomic64_xxx() to replace open-coded zram_stat64_xxx().
Some architectures have native support of atomic64 operations,
so we can get rid of the spin_lock() in zram_stat64_xxx().
On the other hand, for platforms use generic version of atomic64
implement, it may cause an extra save/restore of the interrupt
flag.  So it's a tradeoff.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit da5cc7d338f97886ebf35be92995460289379b73)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/staging/zram/zram_drv.c
drivers/staging/zram/zram_drv.h
drivers/staging/zram/zram_sysfs.c