From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J. Bruce Fields" Subject: [PATCH 01/11] namei: trivial fix to vfs_rename_dir comment Date: Wed, 4 Jun 2014 17:20:53 -0400 Message-ID: <1401916863-7916-2-git-send-email-bfields@redhat.com> References: <1401916863-7916-1-git-send-email-bfields@redhat.com> Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, "J. Bruce Fields" To: Al Viro Return-path: Received: from fieldses.org ([174.143.236.118]:48774 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbaFDVVa (ORCPT ); Wed, 4 Jun 2014 17:21:30 -0400 In-Reply-To: <1401916863-7916-1-git-send-email-bfields@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: "J. Bruce Fields" Looks like the directory loop check is actually done in renameat? Whatever, leave this out rather than trying to keep it up to date with the code. Signed-off-by: J. Bruce Fields --- fs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namei.c b/fs/namei.c index 8016827..b837754 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4017,7 +4017,7 @@ SYSCALL_DEFINE2(link, const char __user *, oldname, const char __user *, newname * The worst of all namespace operations - renaming directory. "Perverted" * doesn't even start to describe it. Somebody in UCB had a heck of a trip... * Problems: - * a) we can get into loop creation. Check is done in is_subdir(). + * a) we can get into loop creation. * b) race potential - two innocent renames can create a loop together. * That's where 4.4 screws up. Current fix: serialization on * sb->s_vfs_rename_mutex. We might be more accurate, but that's another -- 1.7.9.5