zram: move comp allocation out of init_lock
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Mon, 7 Apr 2014 22:38:19 +0000 (15:38 -0700)
committerAlex Shi <alex.shi@linaro.org>
Mon, 11 May 2015 12:43:30 +0000 (20:43 +0800)
commitc7bb5623e03444502f37821e1a391ef61828d4c3
tree61543bd355fff9feba5c55733e2c5e09e6060827
parentf84e7a4599807591a02c524314c1a78cc01ba41d
zram: move comp allocation out of init_lock

While fixing lockdep spew of ->init_lock reported by Sasha Levin [1],
Minchan Kim noted [2] that it's better to move compression backend
allocation (using GPF_KERNEL) out of the ->init_lock lock, same way as
with zram_meta_alloc(), in order to prevent the same lockdep spew.

[1] https://lkml.org/lkml/2014/2/27/337
[2] https://lkml.org/lkml/2014/3/3/32

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reported-by: Minchan Kim <minchan@kernel.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit d61f98c70e8b0d324e8e83be2ed546d6295e63f3)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
drivers/block/zram/zram_drv.c