Re: d_sb field in dentry?

Linus Torvalds (
Wed, 10 Sep 1997 14:24:02 -0700 (PDT)

On Wed, 10 Sep 1997, Bill Hawes wrote:
> To get smbfs to work right with dentry arguments, I had to write a
> function to return the super block for a dentry. The fs code needs the
> super block to check some options, which are needed to look up a dentry
> to get the inode that tells the super block that the dentry is rooted
> to.
> This would be much easier if dentries carried a d_sb field, since
> they'll be rooted to that sb for life. This would also make it easier
> to do a shrink_dcache(super_block), which would be nice for unmounting,
> and for purging the dcache for one fs to limit open files.
> Does this seem like a reasonable addition?

Sure. I hate duplicating data in the inode, though, so if you think of
some way of then getting rid of 'i_sb', that would be good.