]> rtime.felk.cvut.cz Git - linux-imx.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2013 19:12:21 +0000 (12:12 -0700)
commitda5cc7d338f97886ebf35be92995460289379b73
tree847b5eaef22ffb4041becdebec2e2888e3dd55f2
parent42e99bd975fdd24d2bf1a24ebb8b0b42bab8ba65
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>
drivers/staging/zram/zram_drv.c
drivers/staging/zram/zram_drv.h
drivers/staging/zram/zram_sysfs.c