Re: [PATCH] VFS autmounter support

H. Peter Anvin
2003-06-18T17:02:48Z

David Howells wrote:
>>
>>That's actually not true. It's lstat() that mustn't cause the automount
>>point to mount -- stat() only comes into play if lstat() resolves to a
>>symlink. However, lstat() never invokes follow_link, so creating a
>>dentry with a follow_link method resolving to itself, and an associated
>>dummy directory inode, does what's required.
>
> That _is_ actually true. Doing "ls -l" in that directory would otherwise cause
> a mount storm.
>

It's not. ls -l and all the GUI tools do lstat(), not stat().

> follow_link resolving to itself? Surely that'll cause ELOOP very quickly? And
> where does this "dummy directory inode" live?

Nope. You can follow_link() nonrecursively. You need a dummy directory
inode to mount upon anyway.

-hpa