Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966325AbbBCQUE (ORCPT ); Tue, 3 Feb 2015 11:20:04 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:65072 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755956AbbBCQUC (ORCPT ); Tue, 3 Feb 2015 11:20:02 -0500 Date: Wed, 4 Feb 2015 01:20:32 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , Ganesh Mahendran , sergey.senozhatsky.work@gmail.com, Andrew Morton , Jerome Marchand , linux-kernel Subject: Re: [PATCH] zram: fix umount-reset_store-mount race condition Message-ID: <20150203162031.GC1046@swordfish> References: <1422886120-16534-1-git-send-email-sergey.senozhatsky@gmail.com> <20150203141525.GA1050@swordfish> <20150203145200.GA1046@swordfish> <20150203150624.GB1046@swordfish> <20150203153923.GA2644@blaptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150203153923.GA2644@blaptop> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 790 Lines: 35 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/