summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h14
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)
#endif /* CONFIG_FILE_LOCKING */
/* fs/open.c */
+struct filename {
+ const char *name; /* pointer to actual string */
+ const __user char *uptr; /* original userland pointer */
+};
extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
struct file *filp);
@@ -2208,7 +2212,9 @@ extern struct file *file_open_root(struct dentry *, struct vfsmount *,
const char *, int);
extern struct file * dentry_open(const struct path *, int, const struct cred *);
extern int filp_close(struct file *, fl_owner_t id);
-extern char * getname(const char __user *);
+
+extern struct filename *getname(const char __user *);
+
enum {
FILE_CREATED = 1,
FILE_OPENED = 2
@@ -2228,12 +2234,14 @@ extern void __init vfs_caches_init(unsigned long);
extern struct kmem_cache *names_cachep;
+extern void final_putname(struct filename *name);
+
#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
#ifndef CONFIG_AUDITSYSCALL
-#define putname(name) __putname(name)
+#define putname(name) final_putname(name)
#else
-extern void putname(const char *name);
+extern void putname(struct filename *name);
#endif
#ifdef CONFIG_BLOCK