Messages in this thread | | | Subject | Re: get_unused_fd() | From | Magnus Ahltorp <> | Date | 24 Oct 1998 13:52:12 +0100 |
| |
> Umm... Say it, I'ld like to see reasons for that and they'ld > better be very serious. Anyway, it's up to Linus to make any decisions on > that stuff. Exporting something makes it much more permanent. If symbol is > available only from the kernel - well, one has to consider kernel alone > when/if he'll want to change it. If it is exported... any change may break > 3rd-party modules. Any additional exported symbol to == potential boat > anchor.
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/
| |