Re: [Nbd] [PATCH 2/6] block: loop: don't hold lo_ctl_mutex in lo_open
- To: Ming Lei <ming.lei@...1301...>
- Cc: Jens Axboe <axboe@...161...>, "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>, linux-s390@...25..., Stefan Haberland <stefan.haberland@...1296...>, Sebastian Ott <sebott@...1294...>, Linux Kernel Mailing List <linux-kernel@...25...>, Jarod Wilson <jarod@...696...>, Christoph Hellwig <hch@...1270...>, Fabian Frederick <fabf@...1980...>, Alexander Viro <viro@...1300...>, David Herrmann <dh.herrmann@...17...>, Tejun Heo <tj@...1285...>, Andrew Morton <akpm@...133...>
- Subject: Re: [Nbd] [PATCH 2/6] block: loop: don't hold lo_ctl_mutex in lo_open
- From: Christoph Hellwig <hch@...1270...>
- Date: Mon, 6 Apr 2015 07:49:51 -0700
- Message-id: <20150406144951.GB2703@...1270...>
- In-reply-to: <CACVXFVMFxAdG3BNtO82uhv8RTYErk5c9ts4+QVpbne+4WHnVqA@...18...>
- References: <1428218688-4092-1-git-send-email-ming.lei@...1301...> <1428218688-4092-3-git-send-email-ming.lei@...1301...> <CACVXFVMFxAdG3BNtO82uhv8RTYErk5c9ts4+QVpbne+4WHnVqA@...18...>
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.
Reply to: