From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752821Ab2BAXS1 (ORCPT ); Wed, 1 Feb 2012 18:18:27 -0500 Received: from mail-yx0-f174.google.com ([209.85.213.174]:33702 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588Ab2BAXSZ (ORCPT ); Wed, 1 Feb 2012 18:18:25 -0500 MIME-Version: 1.0 In-Reply-To: References: <4F27120A.4040106@suse.cz> <20120130220611.GA26655@kroah.com> <20120130221059.26ab5edf@pyramind.ukuu.org.uk> <20120130222717.GA6393@kroah.com> <4F27C6EB.2070305@suse.cz> From: Linus Torvalds Date: Wed, 1 Feb 2012 15:18:05 -0800 X-Google-Sender-Auth: yybVqAkNOS-8MFUtLiOT0epuGB0 Message-ID: Subject: Re: [PATCH] sysfs: Optionally count subdirectories to support buggy applications To: "Eric W. Biederman" Cc: Greg Kroah-Hartman , Jiri Slaby , Greg KH , Alan Cox , LKML , Al Viro , Maciej Rutecki 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 On Wed, Feb 1, 2012 at 3:15 PM, Linus Torvalds wrote: > > No extra "keep track of inode counts by hand" crap, and no idiotic > config options that just make it easy to (conditionally) get things > wrong. Just do it right, and do it *unconditionally* right. And btw, "nlink shows number of subdirectories" for a directory entry really *is* right. It's how Unix filesystems work, like it or not. It's mainly lazy/bad filesystems that set nlink to 1. So the whole "nlink==1" case is meant for crap like FAT etc, not for a filesystem that we control and that could easily just do it right. Which is why I detest that config option. It's as if you were asking the user "Do you want to make the sysfs filesystem act like crap filesystems?" and kernel config time. What kind of inane question is that? Linus