From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 6 Apr 2015 07:49:51 -0700 From: Christoph Hellwig Subject: Re: [PATCH 2/6] block: loop: don't hold lo_ctl_mutex in lo_open Message-ID: <20150406144951.GB2703@infradead.org> References: <1428218688-4092-1-git-send-email-ming.lei@canonical.com> <1428218688-4092-3-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Archive: List-Post: To: Ming Lei Cc: Jens Axboe , Linux Kernel Mailing List , Christoph Hellwig , Tejun Heo , Andrew Morton , Alexander Viro , Jarod Wilson , David Herrmann , Markus Pargmann , "nbd-general@lists.sourceforge.net" , Stefan Haberland , Sebastian Ott , Fabian Frederick , linux-s390@vger.kernel.org List-ID: On Mon, Apr 06, 2015 at 12:28:22AM +0800, Ming Lei wrote: > Another simpler way is to make lo_refcnt as atomic_t and remove > lo_ctrl_mutext in lo_open(), and freeze request queue during clearing > fd, and better to freeze queue during setting fd too, so will update in > v1 with this way. Using an atomic_t sounds good to me.