The policy seems to be "if we have a module in the _mainstream_ kernel
that uses a symbol, let's export it", and not "if there is a need for
a symbol, let's export it".
> Wait a bit. If you have dentry and want to fit a struct file atop
> of it - you don't need either get_unused_fd() or get_empty_filp(). There
> is open_dentry() (fs/exec.c; exported). It looks like cleaner solution.
> OTOH you didn't describe your problem, so...
I looked at that function, and it solves the _current_ problem I have,
yes. But what is the real problem of modules allocating space in the
file descriptor table? And, how am I to know that it is boat anchorish
to use a plain simple space allocation function, and it is not
anchorish to use a function that only exists to serve different
binfmts?
Would open_dentry() be exported if binfmts didn't exist as modules? I
doubt so. There isn't even a comment above open_dentry that says "use
this function if...", and that _really_ leads to boat anchorish
behaviour. Documentation, not restriction, is needed.
/Magnus
map@stacken.kth.se
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/