[systemd-devel] sysfs regression: wrong link counts

Al Viro viro at ZenIV.linux.org.uk
Mon Jan 30 14:43:50 PST 2012


On Mon, Jan 30, 2012 at 02:27:17PM -0800, Greg KH wrote:
> On Mon, Jan 30, 2012 at 10:10:59PM +0000, Alan Cox wrote:
> > > Isn't there some other "proper" way of doing this in userspace, or is
> > > this really the correct way?
> > 
> > You can look at the S_IFMT bits and stuff however link count indicating
> > number of subdirectories is a standard Unix thing and used by many quite
> > mundane tools as an optimisation.
> 
> Ah, yeah, that is easier.
> 
> Eric, care to fix this or want me to revert it?

Fix _what_?  Userland shite quoted upthread?  Because that's where the bug
is - the mundane tools mentioned by Alan treat 1 in st_nlink as "no
information about the number of subdirectories".  And shite might be too
mild a term for the little gem in question, really...


More information about the systemd-devel mailing list