From: Bernd Schubert Subject: lockdep annotation question Date: Wed, 24 Apr 2013 20:03:41 +0200 Message-ID: <51781E7D.5020706@itwm.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from mailgw1.uni-kl.de ([131.246.120.220]:41277 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507Ab3DXSDs (ORCPT ); Wed, 24 Apr 2013 14:03:48 -0400 Received: from itwm2.itwm.fhg.de (itwm2.itwm.fhg.de [131.246.191.3]) by mailgw1.uni-kl.de (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3OI3hDA002366 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NOT) for ; Wed, 24 Apr 2013 20:03:45 +0200 Received: from mail2.itwm.fhg.de ([131.246.191.79]:55928) by itwm2.itwm.fhg.de with esmtps (TLSv1:DES-CBC3-SHA:168) (/C=DE/ST=Rheinland-Pfalz/L=Kaiserslautern/O=Fraunhofer ITWM/OU=SLG/CN=mail2.itwm.fhg.de)(verified=1) (Exim 4.74 #1) id 1UV42f-0006lq-MB for linux-fsdevel@vger.kernel.org; Wed, 24 Apr 2013 20:03:41 +0200 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi all, I'm just trying to fix the FhGFS lockdep annotation (client is open source) and I don't figure out one of the issues: getattr: 1) holds fhgfs_inode->semaphore 2) holds fhgfs_inode->handle_mutex append-write: 1) holds fhgfs_inode->append_mutex 2) holds fhgfs_inode->semaphore 3) holds fhgfs_inode->handle_mutex Now lockdep always complains on append writes about a possible circular dependency. Disabling the append mutex fixes it, but that is definitely not the right way, of course. I already tried mutex_lock_nested(&append_mutex, PARENT); and mutex_lock_nested(&handle_mutex, CHILD); but that didn't help. Any hints what I'm missing? Thanks in advance, Bernd