diff options
author | Al Viro | 2008-07-30 10:13:04 +0200 |
---|---|---|
committer | Al Viro | 2008-08-01 17:25:23 +0200 |
commit | 1027abe8827b47f7e9c4ed6514fde3d44f79963c (patch) | |
tree | be6aba7e46176534cc71622de53a8bcbf28a06c4 /include | |
parent | [PATCH] ipv4_static_sysctl_init() should be under CONFIG_SYSCTL (diff) | |
download | kernel-qcow2-linux-1027abe8827b47f7e9c4ed6514fde3d44f79963c.tar.gz kernel-qcow2-linux-1027abe8827b47f7e9c4ed6514fde3d44f79963c.tar.xz kernel-qcow2-linux-1027abe8827b47f7e9c4ed6514fde3d44f79963c.zip |
[PATCH] merge locate_fd() and get_unused_fd()
New primitive: alloc_fd(start, flags). get_unused_fd() and
get_unused_fd_flags() become wrappers on top of it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/file.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index 27c64bdc68c9..a20259e248a5 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -34,8 +34,9 @@ extern struct file *fget(unsigned int fd); extern struct file *fget_light(unsigned int fd, int *fput_needed); extern void set_close_on_exec(unsigned int fd, int flag); extern void put_filp(struct file *); +extern int alloc_fd(unsigned start, unsigned flags); extern int get_unused_fd(void); -extern int get_unused_fd_flags(int flags); +#define get_unused_fd_flags(flags) alloc_fd(0, (flags)) extern void put_unused_fd(unsigned int fd); extern void fd_install(unsigned int fd, struct file *file); |