Commit 1a7bd226 authored by Al Viro's avatar Al Viro

make get_unused_fd_flags() a function

... and get_unused_fd() a macro around it
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 56b31d1c
...@@ -477,8 +477,8 @@ int alloc_fd(unsigned start, unsigned flags) ...@@ -477,8 +477,8 @@ int alloc_fd(unsigned start, unsigned flags)
return error; return error;
} }
int get_unused_fd(void) int get_unused_fd_flags(unsigned flags)
{ {
return alloc_fd(0, 0); return alloc_fd(0, flags);
} }
EXPORT_SYMBOL(get_unused_fd); EXPORT_SYMBOL(get_unused_fd_flags);
...@@ -33,8 +33,8 @@ extern struct file *fget_raw_light(unsigned int fd, int *fput_needed); ...@@ -33,8 +33,8 @@ extern struct file *fget_raw_light(unsigned int fd, int *fput_needed);
extern void set_close_on_exec(unsigned int fd, int flag); extern void set_close_on_exec(unsigned int fd, int flag);
extern void put_filp(struct file *); extern void put_filp(struct file *);
extern int alloc_fd(unsigned start, unsigned flags); extern int alloc_fd(unsigned start, unsigned flags);
extern int get_unused_fd(void); extern int get_unused_fd_flags(unsigned flags);
#define get_unused_fd_flags(flags) alloc_fd(0, (flags)) #define get_unused_fd() get_unused_fd_flags(0)
extern void put_unused_fd(unsigned int fd); extern void put_unused_fd(unsigned int fd);
extern void fd_install(unsigned int fd, struct file *file); extern void fd_install(unsigned int fd, struct file *file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment