From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:44192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727307AbeI0TrB (ORCPT ); Thu, 27 Sep 2018 15:47:01 -0400 Date: Thu, 27 Sep 2018 06:28:43 -0700 From: Matthew Wilcox To: Jan Kara Cc: Dan Williams , linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, Barret Rhoden Subject: Re: [PATCH] dax: Fix deadlock in dax_lock_mapping_entry() Message-ID: <20180927132843.GA19006@bombadil.infradead.org> References: <20180927112332.3649-1-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180927112332.3649-1-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Sep 27, 2018 at 01:23:32PM +0200, Jan Kara wrote: > When dax_lock_mapping_entry() has to sleep to obtain entry lock, it will > fail to unlock mapping->i_pages spinlock and thus immediately deadlock > against itself when retrying to grab the entry lock again. Fix the > problem by unlocking mapping->i_pages before retrying. It seems weird that xfstests doesn't provoke this ...