Re: [PATCH] Add MS_BIND_FLAGS mount flag

From: Trond Myklebust
Date: Thu Feb 14 2008 - 18:33:31 EST



On Thu, 2008-02-14 at 23:18 +0100, Miklos Szeredi wrote:

> I understand perfectly that this is what you want to do. And I'm
> saying that the following code snippet should do exactly the same,
> without having to add a new syscall:
>
> char tmpbuf[64];
> sprintf(tmpbuf, "/proc/self/fd/%i", fd);
> mount(dev_name, tmpbuf, type, flags, data);
>
> [ You could actually try to read people's responses, instead of
> immediately assuming they don't understand :-/ ]

I did read your reply, but the follow-link magic that is performed in
proc_fd_link() wasn't immediately obvious to someone who is unfamiliar
with that code. I understand where you're coming from now.

Anyhow, that does indeed look as if it will do what is needed for the
automounter.

Trond

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