Re: [RFC] st_nlink after rmdir() and rename()

From: Al Viro
Date: Wed Mar 02 2011 - 23:42:49 EST


On Thu, Mar 03, 2011 at 03:24:54AM +0000, Al Viro wrote:
> 0 0: ext*, xfs, jfs, reiserfs, ocfs2, gfs2, nilfs, exofs, udf, ubifs,
> minix, sysv, ufs, msdos, vfat, hfs+
> 0 1: ramfs, shmem, hugetlbfs, jffs2, omfs, hfs[*], apparently nfs as well

> [*] yes, different from hfs+; the code is clearly broken, since it simply
> does unlink() on target, without even verifying that it's empty. And
> yes, it's trivial fs corruption...

Actually, hfs turns out to be 0 0 as well; it *is* broken (lacks check
for target being empty), but when the target is empty it's doing the
right thing. jffs2 and ramfs-based ones do 0 1 - confirmed by direct
experiment.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/