Re: [PATCH] VFS autmounter support

From: H. Peter Anvin (hpa@zytor.com)
Date: Wed Jun 18 2003 - 12:16:33 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:25 EST