diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-09-30 14:58:31 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-20 18:38:22 -0400 |
commit | 010e3b48fca57920557d2b80b83f8b2899fb5d1e (patch) | |
tree | df18bbb03fe34602412df792094dfbb6d6dca20e | |
parent | 6f453ed6c07dbed83b368269c9c0fb170866ee71 (diff) |
ceph: don't crash when passed bad mount options
This only happened when parse_extra_token was not passed
to ceph_parse_option() (hence, only happened in rbd).
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
-rw-r--r-- | net/ceph/ceph_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c index f6f2eebc0767..f3e4a13fea0c 100644 --- a/net/ceph/ceph_common.c +++ b/net/ceph/ceph_common.c | |||
@@ -249,7 +249,7 @@ int ceph_parse_options(struct ceph_options **popt, char *options, | |||
249 | continue; | 249 | continue; |
250 | err = -EINVAL; | 250 | err = -EINVAL; |
251 | token = match_token((char *)c, opt_tokens, argstr); | 251 | token = match_token((char *)c, opt_tokens, argstr); |
252 | if (token < 0) { | 252 | if (token < 0 && parse_extra_token) { |
253 | /* extra? */ | 253 | /* extra? */ |
254 | err = parse_extra_token((char *)c, private); | 254 | err = parse_extra_token((char *)c, private); |
255 | if (err < 0) { | 255 | if (err < 0) { |