Lines Matching defs:filename
127 #define EMBEDDED_NAME_MAX (PATH_MAX - offsetof(struct filename, iname))
129 struct filename *
130 getname_flags(const char __user *filename, int flags, int *empty)
132 struct filename *result;
136 result = audit_reusename(filename);
145 * First, try to embed the struct filename inside the names_cache
151 len = strncpy_from_user(kname, filename, EMBEDDED_NAME_MAX);
159 * separate struct filename so we can dedicate the entire
164 const size_t size = offsetof(struct filename, iname[1]);
178 len = strncpy_from_user(kname, filename, PATH_MAX);
202 result->uptr = filename;
208 struct filename *
209 getname_uflags(const char __user *filename, int uflags)
213 return getname_flags(filename, flags, NULL);
216 struct filename *
217 getname(const char __user * filename)
219 return getname_flags(filename, 0, NULL);
222 struct filename *
223 getname_kernel(const char * filename)
225 struct filename *result;
226 int len = strlen(filename) + 1;
235 const size_t size = offsetof(struct filename, iname[1]);
236 struct filename *tmp;
249 memcpy((char *)result->name, filename, len);
259 void putname(struct filename *name)
584 struct filename *name;
596 static void __set_nameidata(struct nameidata *p, int dfd, struct filename *name)
610 static inline void set_nameidata(struct nameidata *p, int dfd, struct filename *name,
2504 int filename_lookup(int dfd, struct filename *name, unsigned flags,
2543 static int __filename_parentat(int dfd, struct filename *name,
2568 static int filename_parentat(int dfd, struct filename *name,
2576 static struct dentry *__kern_path_locked(struct filename *name, struct path *path)
2600 struct filename *filename = getname_kernel(name);
2601 struct dentry *res = __kern_path_locked(filename, path);
2603 putname(filename);
2609 struct filename *filename = getname_kernel(name);
2610 int ret = filename_lookup(AT_FDCWD, filename, flags, path, NULL);
2612 putname(filename);
2620 * @filename: filename structure
2627 int vfs_path_parent_lookup(struct filename *filename, unsigned int flags,
2631 return __filename_parentat(AT_FDCWD, filename, flags, parent, last,
2648 struct filename *filename;
2652 filename = getname_kernel(name);
2654 ret = filename_lookup(AT_FDCWD, filename, flags, path, &root);
2655 putname(filename);
2910 struct filename *filename = getname_flags(name, flags, empty);
2911 int ret = filename_lookup(dfd, filename, flags, path, NULL);
2913 putname(filename);
3810 struct file *do_filp_open(int dfd, struct filename *pathname,
3832 struct filename *filename;
3838 filename = getname_kernel(name);
3839 if (IS_ERR(filename))
3840 return ERR_CAST(filename);
3842 set_nameidata(&nd, -1, filename, root);
3849 putname(filename);
3853 static struct dentry *filename_create(int dfd, struct filename *name,
3924 struct filename *filename = getname_kernel(pathname);
3925 struct dentry *res = filename_create(dfd, filename, path, lookup_flags);
3927 putname(filename);
3944 struct filename *filename = getname(pathname);
3945 struct dentry *res = filename_create(dfd, filename, path, lookup_flags);
3947 putname(filename);
4017 static int do_mknodat(int dfd, struct filename *name, umode_t mode,
4068 SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode,
4071 return do_mknodat(dfd, getname(filename), mode, dev);
4074 SYSCALL_DEFINE3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev)
4076 return do_mknodat(AT_FDCWD, getname(filename), mode, dev);
4122 int do_mkdirat(int dfd, struct filename *name, umode_t mode)
4216 int do_rmdir(int dfd, struct filename *name)
4355 int do_unlinkat(int dfd, struct filename *name)
4482 int do_symlinkat(struct filename *from, int newdfd, struct filename *to)
4623 int do_linkat(int olddfd, struct filename *old, int newdfd,
4624 struct filename *new, int flags)
4913 int do_renameat2(int olddfd, struct filename *from, int newdfd,
4914 struct filename *to, unsigned int flags)