diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index b44b4ca82164..6c93b46f46dc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2196,6 +2196,10 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
2196 | #endif /* CONFIG_FILE_LOCKING */ | 2196 | #endif /* CONFIG_FILE_LOCKING */ |
2197 | 2197 | ||
2198 | /* fs/open.c */ | 2198 | /* fs/open.c */ |
2199 | struct filename { | ||
2200 | const char *name; /* pointer to actual string */ | ||
2201 | const __user char *uptr; /* original userland pointer */ | ||
2202 | }; | ||
2199 | 2203 | ||
2200 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 2204 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
2201 | struct file *filp); | 2205 | struct file *filp); |
@@ -2208,7 +2212,9 @@ extern struct file *file_open_root(struct dentry *, struct vfsmount *, | |||
2208 | const char *, int); | 2212 | const char *, int); |
2209 | extern struct file * dentry_open(const struct path *, int, const struct cred *); | 2213 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
2210 | extern int filp_close(struct file *, fl_owner_t id); | 2214 | extern int filp_close(struct file *, fl_owner_t id); |
2211 | extern char * getname(const char __user *); | 2215 | |
2216 | extern struct filename *getname(const char __user *); | ||
2217 | |||
2212 | enum { | 2218 | enum { |
2213 | FILE_CREATED = 1, | 2219 | FILE_CREATED = 1, |
2214 | FILE_OPENED = 2 | 2220 | FILE_OPENED = 2 |
@@ -2228,12 +2234,14 @@ extern void __init vfs_caches_init(unsigned long); | |||
2228 | 2234 | ||
2229 | extern struct kmem_cache *names_cachep; | 2235 | extern struct kmem_cache *names_cachep; |
2230 | 2236 | ||
2237 | extern void final_putname(struct filename *name); | ||
2238 | |||
2231 | #define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) | 2239 | #define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) |
2232 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) | 2240 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) |
2233 | #ifndef CONFIG_AUDITSYSCALL | 2241 | #ifndef CONFIG_AUDITSYSCALL |
2234 | #define putname(name) __putname(name) | 2242 | #define putname(name) final_putname(name) |
2235 | #else | 2243 | #else |
2236 | extern void putname(const char *name); | 2244 | extern void putname(struct filename *name); |
2237 | #endif | 2245 | #endif |
2238 | 2246 | ||
2239 | #ifdef CONFIG_BLOCK | 2247 | #ifdef CONFIG_BLOCK |