From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753313AbbDFOtz (ORCPT ); Mon, 6 Apr 2015 10:49:55 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55557 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbbDFOty (ORCPT ); Mon, 6 Apr 2015 10:49:54 -0400 Date: Mon, 6 Apr 2015 07:49:51 -0700 From: Christoph Hellwig 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 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: User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.