Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

namei.c: switch user pathname imports to CLASS(filename{,_flags})

filename_flags is used by user_path_at(). I suspect that mixing
LOOKUP_EMPTY with real lookup flags had been a mistake all along; the
former belongs to pathname import, the latter - to pathwalk. Right now
none of the remaining in-tree callers of user_path_at() are getting
LOOKUP_EMPTY in flags, so user_path_at() could probably be switched
to CLASS(filename)...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 904f58b5 e9817d5b

+6 -15
+6 -15
fs/namei.c
··· 3031 3031 const char __user *name, 3032 3032 struct path *path) 3033 3033 { 3034 - struct filename *filename = getname(name); 3035 - struct dentry *res = __start_removing_path(dfd, filename, path); 3036 - 3037 - putname(filename); 3038 - return res; 3034 + CLASS(filename, filename)(name); 3035 + return __start_removing_path(dfd, filename, path); 3039 3036 } 3040 3037 EXPORT_SYMBOL(start_removing_user_path_at); 3041 3038 ··· 3610 3613 int user_path_at(int dfd, const char __user *name, unsigned flags, 3611 3614 struct path *path) 3612 3615 { 3613 - struct filename *filename = getname_flags(name, flags); 3614 - int ret = filename_lookup(dfd, filename, flags, path, NULL); 3615 - 3616 - putname(filename); 3617 - return ret; 3616 + CLASS(filename_flags, filename)(name, flags); 3617 + return filename_lookup(dfd, filename, flags, path, NULL); 3618 3618 } 3619 3619 EXPORT_SYMBOL(user_path_at); 3620 3620 ··· 4970 4976 int dfd, const char __user *pathname, 4971 4977 struct path *path, unsigned int lookup_flags) 4972 4978 { 4973 - struct filename *filename = getname(pathname); 4974 - struct dentry *res = filename_create(dfd, filename, path, lookup_flags); 4975 - 4976 - putname(filename); 4977 - return res; 4979 + CLASS(filename, filename)(pathname); 4980 + return filename_create(dfd, filename, path, lookup_flags); 4978 4981 } 4979 4982 EXPORT_SYMBOL(start_creating_user_path); 4980 4983