Commit aa1918f9 authored by Al Viro's avatar Al Viro

get rid of fs_value_is_filename_empty

Its behaviour is identical to that of fs_value_is_filename.
It makes no sense, anyway - LOOKUP_EMPTY affects nothing
whatsoever once the pathname has been imported from userland.
And both fs_value_is_filename and fs_value_is_filename_empty
carry an already imported pathname.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 34264ae3
...@@ -427,7 +427,6 @@ returned. ...@@ -427,7 +427,6 @@ returned.
fs_value_is_string, Value is a string fs_value_is_string, Value is a string
fs_value_is_blob, Value is a binary blob fs_value_is_blob, Value is a binary blob
fs_value_is_filename, Value is a filename* + dirfd fs_value_is_filename, Value is a filename* + dirfd
fs_value_is_filename_empty, Value is a filename* + dirfd + AT_EMPTY_PATH
fs_value_is_file, Value is an open file (file*) fs_value_is_file, Value is an open file (file*)
If there is a value, that value is stored in a union in the struct in one If there is a value, that value is stored in a union in the struct in one
......
...@@ -268,9 +268,6 @@ int fs_lookup_param(struct fs_context *fc, ...@@ -268,9 +268,6 @@ int fs_lookup_param(struct fs_context *fc,
return PTR_ERR(f); return PTR_ERR(f);
put_f = true; put_f = true;
break; break;
case fs_value_is_filename_empty:
flags = LOOKUP_EMPTY;
/* Fall through */
case fs_value_is_filename: case fs_value_is_filename:
f = param->name; f = param->name;
put_f = false; put_f = false;
......
...@@ -321,6 +321,7 @@ SYSCALL_DEFINE5(fsconfig, ...@@ -321,6 +321,7 @@ SYSCALL_DEFINE5(fsconfig,
struct fs_context *fc; struct fs_context *fc;
struct fd f; struct fd f;
int ret; int ret;
int lookup_flags = 0;
struct fs_parameter param = { struct fs_parameter param = {
.type = fs_value_is_undefined, .type = fs_value_is_undefined,
...@@ -409,19 +410,12 @@ SYSCALL_DEFINE5(fsconfig, ...@@ -409,19 +410,12 @@ SYSCALL_DEFINE5(fsconfig,
goto out_key; goto out_key;
} }
break; break;
case FSCONFIG_SET_PATH_EMPTY:
lookup_flags = LOOKUP_EMPTY;
/* fallthru */
case FSCONFIG_SET_PATH: case FSCONFIG_SET_PATH:
param.type = fs_value_is_filename; param.type = fs_value_is_filename;
param.name = getname_flags(_value, 0, NULL); param.name = getname_flags(_value, lookup_flags, NULL);
if (IS_ERR(param.name)) {
ret = PTR_ERR(param.name);
goto out_key;
}
param.dirfd = aux;
param.size = strlen(param.name->name);
break;
case FSCONFIG_SET_PATH_EMPTY:
param.type = fs_value_is_filename_empty;
param.name = getname_flags(_value, LOOKUP_EMPTY, NULL);
if (IS_ERR(param.name)) { if (IS_ERR(param.name)) {
ret = PTR_ERR(param.name); ret = PTR_ERR(param.name);
goto out_key; goto out_key;
......
...@@ -54,7 +54,6 @@ enum fs_value_type { ...@@ -54,7 +54,6 @@ enum fs_value_type {
fs_value_is_string, /* Value is a string */ fs_value_is_string, /* Value is a string */
fs_value_is_blob, /* Value is a binary blob */ fs_value_is_blob, /* Value is a binary blob */
fs_value_is_filename, /* Value is a filename* + dirfd */ fs_value_is_filename, /* Value is a filename* + dirfd */
fs_value_is_filename_empty, /* Value is a filename* + dirfd + AT_EMPTY_PATH */
fs_value_is_file, /* Value is a file* */ fs_value_is_file, /* Value is a file* */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment