summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/file.c6
-rw-r--r--include/linux/file.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/file.c b/fs/file.c
index ba3f6053025c..5b46e9970a7a 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -477,8 +477,8 @@ out:
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);
diff --git a/include/linux/file.h b/include/linux/file.h
index a22408bac0d0..86795ec6027d 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -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 put_filp(struct file *);
extern int alloc_fd(unsigned start, unsigned flags);
-extern int get_unused_fd(void);
-#define get_unused_fd_flags(flags) alloc_fd(0, (flags))
+extern int get_unused_fd_flags(unsigned flags);
+#define get_unused_fd() get_unused_fd_flags(0)
extern void put_unused_fd(unsigned int fd);
extern void fd_install(unsigned int fd, struct file *file);