From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:50307 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbcFQLeY (ORCPT ); Fri, 17 Jun 2016 07:34:24 -0400 Date: Fri, 17 Jun 2016 04:34:23 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: david@fromorbit.com, linux-fsdevel@vger.kernel.org, vishal.l.verma@intel.com, xfs@oss.sgi.com Subject: Re: [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via ftrace Message-ID: <20160617113423.GC19042@infradead.org> References: <146612627129.12839.3827886950949809165.stgit@birch.djwong.org> <146612629822.12839.7938642541078923297.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <146612629822.12839.7938642541078923297.stgit@birch.djwong.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c > index efa2a73..2333db7 100644 > --- a/fs/xfs/xfs_buf.c > +++ b/fs/xfs/xfs_buf.c > @@ -947,7 +947,8 @@ xfs_buf_trylock( > if (locked) > XB_SET_OWNER(bp); > > - trace_xfs_buf_trylock(bp, _RET_IP_); > + locked ? trace_xfs_buf_trylock(bp, _RET_IP_) : > + trace_xfs_buf_trylock_fail(bp, _RET_IP_); > return locked; I think this should be something like: if (locked) { XB_SET_OWNER(bp); trace_xfs_buf_trylock(bp, _RET_IP_); } else { trace_xfs_buf_trylock_fail(bp, _RET_IP_); } otherwise this looks good and can go in without the rest of the series.