From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:46800 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbcKWDkG (ORCPT ); Tue, 22 Nov 2016 22:40:06 -0500 Date: Wed, 23 Nov 2016 03:40:04 +0000 From: Al Viro To: Omar Sandoval Cc: linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, kernel-team@fb.com, Linus Torvalds Subject: Re: [RFC PATCH 2/3] vfs: add d_replace() Message-ID: <20161123034004.GK1555@ZenIV.linux.org.uk> References: <527297d2dae27845b3b7ba8ad6e81ef477fddee2.1479802448.git.osandov@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <527297d2dae27845b3b7ba8ad6e81ef477fddee2.1479802448.git.osandov@fb.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Nov 22, 2016 at 12:25:02AM -0800, Omar Sandoval wrote: > From: Omar Sandoval > > Changes the inode associated with a dentry. This'll be useful for > implementations of linkat() AT_REPLACE. Hard NAK. That violates all kinds of assumptions made by VFS and filesystems alike; never, ever do that. If you have a reference to a positive dentry, inode should *NEVER* change. If it unhashed the old dentry, created a new one and attached inode to it, it _might_ have a chance. I'm less than sure it's a good idea, but it this form it's a non-starter. Again, NAKed-by: Al Viro and don't bring it back in that form.