From: Al Viro Subject: Re: [PATCH] vfs: move ACL cache lookup into generic code Date: Sat, 23 Jul 2011 05:31:20 +0100 Message-ID: <20110723043120.GB24703@ZenIV.linux.org.uk> References: <20110723032944.GA24703@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel To: Linus Torvalds Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:50353 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750720Ab1GWEbW (ORCPT ); Sat, 23 Jul 2011 00:31:22 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jul 22, 2011 at 08:42:35PM -0700, Linus Torvalds wrote: > > ... why is that a problem? ?Locking there is mere ->i_lock and getting > > a refcount is atomic_inc(). ?Grabbing a reference might be Not Nice from > > the cacheline bouncing POV, but... > > I agree in theory, but it's not something we've done before. Some of > the posix-acl code is pretty disgusting, I didn't even want to go > there. > > And the case that tends to really *matter* is the "no acls" case > anyway, and that's the case that is guaranteed to have no nasty races > or odd issues with having to allocate/de-allocate any acl structures. > But yes, this could be looked at. Heh... In addition to ocfs2 leak: 9p leaks nicely if v9fs_acl_mode() is called with !S_ISDIR(mode). In that case acl reference is simply lost. So yes, it's worth looking at.