From 85508ec6cbc21645927b6ac05e3b2748119a3e23 Mon Sep 17 00:00:00 2001 From: Sergey Senozhatsky Date: Thu, 25 Jun 2015 15:00:06 -0700 Subject: [PATCH] zram: use idr instead of `zram_devices' array This patch makes some preparations for on-demand device add/remove functionality. Remove `zram_devices' array and switch to id-to-pointer translation (idr). idr doesn't bloat zram struct with additional members, f.e. list_head, yet still provides ability to match the device_id with the device pointer. No user-space visible changes. [Julia.Lawall@lip6.fr: return -ENOMEM when `queue' alloc fails] Signed-off-by: Sergey Senozhatsky Reported-by: Julia Lawall Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed