Return-Path: Received: from mx2.suse.de ([195.135.220.15]:38847 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbcIUJMY (ORCPT ); Wed, 21 Sep 2016 05:12:24 -0400 Date: Wed, 21 Sep 2016 11:06:23 +0200 From: Jan Kara To: Heiner Kallweit Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Lino Sanfilippo , Guenter Roeck , Andrew Morton Subject: Re: Remark on commit a7900a116803 "fsnotify-convert-notification_mutex-to-a-spinlock-fix" Message-ID: <20160921090623.GA3725@quack2.suse.cz> References: <4f06a772-b22c-6ef1-6778-bf9a0d49452b@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f06a772-b22c-6ef1-6778-bf9a0d49452b@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 20-09-16 18:59:35, Heiner Kallweit wrote: > I was also hit by the false BUG_ON in the first version of the change > and checked how to fix it. The current fix IMHO is overly complex. > > You could simply use assert_spin_locked(lock). It does exactly what > you want and it's even used in other places under fs/notify already. Bah, I was searching for something like this and I failed. Thanks for the pointer. I'll fix up the patch. Honza -- Jan Kara SUSE Labs, CR