mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] fdtable: Provide free_fdtable() wrapper
Christoph Hellwig has expressed concerns that the recent fdtable changes expose the details of the RCU methodology used to release no-longer-used fdtable structures to the rest of the kernel. The trivial patch below addresses these concerns by introducing the appropriate free_fdtable() calls, which simply wrap the release RCU usage. Since free_fdtable() is a one-liner, it makes sense to promote it to an inline helper. Signed-off-by: Vadim Lobanov <vlobanov@speakeasy.net> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
31fccf7fe4
commit
01b2d93ca4
3 changed files with 7 additions and 2 deletions
|
@ -80,6 +80,11 @@ extern int expand_files(struct files_struct *, int nr);
|
|||
extern void free_fdtable_rcu(struct rcu_head *rcu);
|
||||
extern void __init files_defer_init(void);
|
||||
|
||||
static inline void free_fdtable(struct fdtable *fdt)
|
||||
{
|
||||
call_rcu(&fdt->rcu, free_fdtable_rcu);
|
||||
}
|
||||
|
||||
static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
|
||||
{
|
||||
struct file * file = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue