From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: linux-next: build failure after merge of the drm-misc tree Date: Tue, 2 Apr 2019 04:26:56 -0700 Message-ID: <20190402112656.GE22763@bombadil.infradead.org> References: <20190402105006.48f93e53@canb.auug.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Qiang Yu Cc: Stephen Rothwell , Daniel Vetter , Intel Graphics , DRI , Linux Next Mailing List , Linux Kernel Mailing List , Eric Anholt List-Id: dri-devel@lists.freedesktop.org On Tue, Apr 02, 2019 at 01:55:03PM +0800, Qiang Yu wrote: > Thanks, patch is: > Reviewed-by: Qiang Yu This looks like a fairly naive conversion from the old IDR API to the XArray API. You should be able to remove mgr->lock entirely, relying on the xa_lock for synchronising free and get. If you think it's worth it, you could even use kfree_rcu() to free the ctx and kref_get_unless_zero() and then your get path would be lock-free.