|
@@ -210,12 +210,12 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
"integer field, but no integer?\n");
|
|
"integer field, but no integer?\n");
|
|
ret = r;
|
|
ret = r;
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- v9ses->debug = option;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ v9ses->debug = option;
|
|
#ifdef CONFIG_NET_9P_DEBUG
|
|
#ifdef CONFIG_NET_9P_DEBUG
|
|
- p9_debug_level = option;
|
|
|
|
|
|
+ p9_debug_level = option;
|
|
#endif
|
|
#endif
|
|
|
|
+ }
|
|
break;
|
|
break;
|
|
|
|
|
|
case Opt_dfltuid:
|
|
case Opt_dfltuid:
|
|
@@ -231,7 +231,6 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
"uid field, but not a uid?\n");
|
|
"uid field, but not a uid?\n");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
- continue;
|
|
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case Opt_dfltgid:
|
|
case Opt_dfltgid:
|
|
@@ -247,7 +246,6 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
"gid field, but not a gid?\n");
|
|
"gid field, but not a gid?\n");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
- continue;
|
|
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case Opt_afid:
|
|
case Opt_afid:
|
|
@@ -256,9 +254,9 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
p9_debug(P9_DEBUG_ERROR,
|
|
"integer field, but no integer?\n");
|
|
"integer field, but no integer?\n");
|
|
ret = r;
|
|
ret = r;
|
|
- continue;
|
|
|
|
|
|
+ } else {
|
|
|
|
+ v9ses->afid = option;
|
|
}
|
|
}
|
|
- v9ses->afid = option;
|
|
|
|
break;
|
|
break;
|
|
case Opt_uname:
|
|
case Opt_uname:
|
|
kfree(v9ses->uname);
|
|
kfree(v9ses->uname);
|
|
@@ -306,13 +304,12 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
"problem allocating copy of cache arg\n");
|
|
"problem allocating copy of cache arg\n");
|
|
goto free_and_return;
|
|
goto free_and_return;
|
|
}
|
|
}
|
|
- ret = get_cache_mode(s);
|
|
|
|
- if (ret == -EINVAL) {
|
|
|
|
- kfree(s);
|
|
|
|
- goto free_and_return;
|
|
|
|
- }
|
|
|
|
|
|
+ r = get_cache_mode(s);
|
|
|
|
+ if (r < 0)
|
|
|
|
+ ret = r;
|
|
|
|
+ else
|
|
|
|
+ v9ses->cache = r;
|
|
|
|
|
|
- v9ses->cache = ret;
|
|
|
|
kfree(s);
|
|
kfree(s);
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -341,14 +338,12 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
|
|
pr_info("Unknown access argument %s\n",
|
|
pr_info("Unknown access argument %s\n",
|
|
s);
|
|
s);
|
|
kfree(s);
|
|
kfree(s);
|
|
- goto free_and_return;
|
|
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
v9ses->uid = make_kuid(current_user_ns(), uid);
|
|
v9ses->uid = make_kuid(current_user_ns(), uid);
|
|
if (!uid_valid(v9ses->uid)) {
|
|
if (!uid_valid(v9ses->uid)) {
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
pr_info("Uknown uid %s\n", s);
|
|
pr_info("Uknown uid %s\n", s);
|
|
- kfree(s);
|
|
|
|
- goto free_and_return;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|