Re: [PATCHv2 03/10] zram: use idr instead of `zram_devices' array

2015-04-22 Thread Sergey Senozhatsky
On (04/23/15 11:23), Minchan Kim wrote: [..] > > +static int zram_exit_cb(int id, void *ptr, void *data) > > trivial: I prefer remove to exit. > ok. > > +{ > > + zram_remove(ptr); > > + return 0; > > +} > > > > - kfree(zram_devices); > > +static void destroy_devices(void) > > +{ > > +

Re: [PATCHv2 03/10] zram: use idr instead of `zram_devices' array

2015-04-22 Thread Minchan Kim
On Thu, Apr 16, 2015 at 08:55:49PM +0900, Sergey Senozhatsky wrote: > 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. lis