Re: [PATCH] zram: fix umount-reset_store-mount race condition

From: Sergey Senozhatsky
Date: Tue Feb 03 2015 - 11:20:12 EST


hello,

On (02/04/15 00:39), Minchan Kim wrote:
> So, you mean this?
>
> reset_store
>
> down_write(&zram->init_lock);
> zram_reset_device(zram);
> set_capacity(zram->disk, 0);
> up_write(&zram->init_lock);
>
>
> If so, +1.
> Hope you send a squash patch to Andrew.

yes, that's what I meant

+ zram_exit(void):

down_write(&zram->init_lock);
zram_reset_device(zram);
destroy_device(zram);
up_write(&zram->init_lock);


but I did something different and I think, a bit better than this.
sent a patch several minutes ago.

-ss
--
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/