[patch] drivers/zram: Don't disable preemption in zcomp_stream_get/put()

From: Mike Galbraith
Date: Sat Oct 15 2016 - 23:14:41 EST



In v4.7, the driver switched to percpu compression streams, disabling
preemption (get/put_cpu_ptr()). Use get/put_cpu_light() instead.

Signed-off-by: Mike Galbraith <umgwanakikbuti@xxxxxxxxx>
---
drivers/block/zram/zcomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/block/zram/zcomp.c
+++ b/drivers/block/zram/zcomp.c
@@ -118,12 +118,12 @@ ssize_t zcomp_available_show(const char

struct zcomp_strm *zcomp_stream_get(struct zcomp *comp)
{
- return *get_cpu_ptr(comp->stream);
+ return *per_cpu_ptr(comp->stream, get_cpu_light());
}

void zcomp_stream_put(struct zcomp *comp)
{
- put_cpu_ptr(comp->stream);
+ put_cpu_light();
}

int zcomp_compress(struct zcomp_strm *zstrm,