mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:30:52 +07:00
make get_unused_fd_flags() a function
... and get_unused_fd() a macro around it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
56b31d1c9f
commit
1a7bd2265f
@ -477,8 +477,8 @@ int alloc_fd(unsigned start, unsigned flags)
|
||||
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);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user