Re: [patch] F_GETPATH for linux

From: Linus Torvalds
Date: Mon Apr 14 2008 - 10:49:14 EST




On Mon, 14 Apr 2008, Christoph Hellwig wrote:
>
> Adding a duplicated API like this is rather pointless. Especially as
> the readlink is easier and makes more sense.

Well, I wouldn't say "makes more sense". It may be more traditional (for
Linux), but it has its problems, notably performance. One use of F_GETPATH
is for server code, to check that a previous open() didn't follow symlinks
to outside of some specified area.

Not that I like F_GETPATH much either, but portability is a strong enough
argument that coming up with some *other* way is probably not great.

Linus
--
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/