[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] POSIX extended API set 2
On Sun, Nov 11, 2012 at 08:31:02AM +0100, Emmanuel Dreyfus wrote:
> > I don't think namei.h / vfs_lookup.c is the right place to be handling
> > file descriptors. Can you make these take vnodes, rather than file
> > descriptors, or move them into vfs_syscalls.c?
> I made the change, but it makes nameiat_simple_user() usage more
> complicated, with code duplicated on each call (see example at the end)
That's like saying the usage of namei is more complicated because
namei doesn't handle copyin for you. The original openat patches got
rejected precisely because they wedged file handle operations the guts
of namei, where they don't belong.
namei is a vfs layer construct. File handles are system call layer
constructs. We have little enough internal structure in the kernel as
it is without gratuitously making it worse.
> > I think you'll leak pb here in the error branch above. I haven't gone
> > through the other error branches in the patch, but the proliferation
> > of new resource acquisitions requiring clean-up makes me nervous.
> The problem is that we need to hold a reference on the vnode we use
> in NDAT().
I don't see that this is a problem.
David A. Holland
Main Index |
Thread Index |