Re: minor patch for 2.1.51 dcache

Linus Torvalds (torvalds@transmeta.com)
Tue, 19 Aug 1997 10:47:42 -0700 (PDT)


On Tue, 19 Aug 1997, Bill Hawes wrote:
>
> In d_delete the d_alias list isn't re-inited after doing the list_del,
> so it could cause problems testing list_empty(&dentry->d_alias) later.

Hmm.. We should never be testing "list_empty(&dentry->d_alias)" anywhere,
and none of the other places that get rid of the inode do this, so I don't
think your patch is necessarily correct. It certainly cannot break
anything, but I also don't see it actually fixing anything either.

I fact I wonder whether we should not get rid of the alias list
completely, as it's not actually _used_ for anything any more (well, it's
used by romfs/inode.c, but the only reason for that is that romfs symbolic
links are kind of broken (it's confused about directories and symbolic
links). That together with a strange interface (we give "follow_link" the
inode rather than the dentry) makes for the romfs problems.

The alias list was useful back when inodes were first-class citizens, and
lots of places had inode information but no dentry information. These days
everything that needs a dentry pointer should have the dentry pointer
anyway, without needing to get it through an inode.

Linus