Re: 2.6.18-rc4-mm1

David Howells
2006-08-16T13:20:46Z

Ian Kent <raven@themaw.net> wrote:

> > The negative dentry wouldn't normally be a problem, even though it's
> > attached to its parent directory... except for the small matter that it's
> > subsequently listed in a directory read operation.
>
> Surely this dentry should also be unhashed at some point.
> Wouldn't that be a sensible result of the failed operation?

Why? The lookup op succeeded, so obviously there wasn't anything there,
right?

Note that nfs_lookup_revalidate() doesn't cause the dentry to be revalidated
because the mtime on the parent directory hasn't changed.

I'm considering having nfs_readdir_lookup() mark a negative dentry it
encounters as named in a directory listing for explicit revalidation, but I
can't call nfs_mark_for_revalidate() since I don't have an inode.

I think I'll need to add a dentry flag for this purpose.

David