Re: [PATCH 2/8] zram: use idr instead of `zram_devices' array

From: Andrew Morton
Date: Tue Mar 03 2015 - 17:01:47 EST


On Tue, 3 Mar 2015 21:49:44 +0900 Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx> wrote:

> This patch makes some preparations for dynamic device ADD/REMOVE functionality
> via /dev/zram-control interface.
>
> 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.
>
> ...
>
> +static DEFINE_IDR(zram_index_idr);

There is no locking protecting this idr?


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/