aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/file.h
diff options
context:
space:
mode:
authorVadim Lobanov <vlobanov@speakeasy.net>2006-12-22 04:10:43 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-22 11:55:50 -0500
commit01b2d93ca4c495f056471189ac6c4e6ac4cbbccb (patch)
tree86aa1aabae8207e693e31ee68b526376388a36a3 /include/linux/file.h
parent31fccf7fe4097e62f038bdfe8f4f68ecaea8ebe7 (diff)
[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>
Diffstat (limited to 'include/linux/file.h')
-rw-r--r--include/linux/file.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index edca361f2ab4..a59001e9ea58 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -80,6 +80,11 @@ extern int expand_files(struct files_struct *, int nr);
80extern void free_fdtable_rcu(struct rcu_head *rcu); 80extern void free_fdtable_rcu(struct rcu_head *rcu);
81extern void __init files_defer_init(void); 81extern void __init files_defer_init(void);
82 82
83static inline void free_fdtable(struct fdtable *fdt)
84{
85 call_rcu(&fdt->rcu, free_fdtable_rcu);
86}
87
83static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd) 88static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
84{ 89{
85 struct file * file = NULL; 90 struct file * file = NULL;