Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758875Ab1CCVxL (ORCPT ); Thu, 3 Mar 2011 16:53:11 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:32858 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754614Ab1CCVxK (ORCPT ); Thu, 3 Mar 2011 16:53:10 -0500 MIME-Version: 1.0 In-Reply-To: <87lj0v9984.fsf@devron.myhome.or.jp> References: <20110303032454.GI22723@ZenIV.linux.org.uk> <20110303060352.GK22723@ZenIV.linux.org.uk> <87tyfk7x0c.fsf@devron.myhome.or.jp> <87lj0v9984.fsf@devron.myhome.or.jp> From: Linus Torvalds Date: Thu, 3 Mar 2011 13:52:18 -0800 Message-ID: Subject: Re: [RFC] st_nlink after rmdir() and rename() To: OGAWA Hirofumi Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 26 On Thu, Mar 3, 2011 at 1:37 PM, OGAWA Hirofumi wrote: > > And I can't only see is why you refuse to make consistent behavior (if > you are saying it). It's why I said if it's _really easy_. The thing is, it really isn't really easy. As mentioned, it's actually impossible on NFS, and it's possibly impossible on other filesystems too. So what I'm objecting to is "try to make something consistent that CANNOT be consistent anyway", and calling it a bug. I'm not saying there aren't real bugs there too (the actual races in i_nlink handling are real bugs). But I _am_ saying that it's simply not true that i_nlink must be zero if you do an "fstat()" after doing an rmdir on an fd that you held open. Nobody can reasonably care, and anybody who _does_ care is better off getting a nasty surprise early rather than late. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/