From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v2] vfs: Don't exchange "short" filenames unconditionally. Date: Sat, 27 Sep 2014 12:37:36 -0700 Message-ID: References: <1411582473-29184-1-git-send-email-sem@altlinux.org> <20140924185521.GC7996@ZenIV.linux.org.uk> <20140924201813.GI7996@ZenIV.linux.org.uk> <20140925044601.GL7996@ZenIV.linux.org.uk> <20140926164442.GA26897@ZenIV.linux.org.uk> <20140927044555.GS7996@ZenIV.linux.org.uk> <20140927183139.GT7996@ZenIV.linux.org.uk> <20140927191657.GU7996@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Mikhail Efremov , Linux Kernel Mailing List , Miklos Szeredi , linux-fsdevel , stable To: Al Viro Return-path: In-Reply-To: <20140927191657.GU7996@ZenIV.linux.org.uk> Sender: stable-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sat, Sep 27, 2014 at 12:16 PM, Al Viro wrote: > > FWIW, I suspect that the right approach is to put refcount + rcu_head in > front of external name and do the following: That's actually fancier than I was expecting. I was just thinking doing a whole new allocation and freeing the old one using RCU. But I guess you're right, you do need the rcu_head even for that, and once you start adding fields you might as well just add a refcount too, and then you don't have the annoyance of a potential memory allocation in that code. So your approach is better and doesn't sound too painful at all. But yeah, I guess we can/should do the trivial ugly thing for 3.17. Send me a proper pull-request, Linus