summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-07-30 04:13:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-08-01 11:25:23 -0400
commit1027abe8827b47f7e9c4ed6514fde3d44f79963c (patch)
treebe6aba7e46176534cc71622de53a8bcbf28a06c4 /include
parenta1bc6eb4b499ae67ada9a01660010580b6569403 (diff)
downloadlinux-1027abe8827b47f7e9c4ed6514fde3d44f79963c.tar.bz2
[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.h3
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);