summaryrefslogtreecommitdiffstats
path: root/net/ceph/ceph_common.c
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-09-30 11:58:31 -0700
committerSage Weil <sage@newdream.net>2010-10-20 15:38:22 -0700
commit010e3b48fca57920557d2b80b83f8b2899fb5d1e (patch)
treedf18bbb03fe34602412df792094dfbb6d6dca20e /net/ceph/ceph_common.c
parent6f453ed6c07dbed83b368269c9c0fb170866ee71 (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>
Diffstat (limited to 'net/ceph/ceph_common.c')
-rw-r--r--net/ceph/ceph_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index f6f2eebc076..f3e4a13fea0 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,
continue;
err = -EINVAL;
token = match_token((char *)c, opt_tokens, argstr);
- if (token < 0) {
+ if (token < 0 && parse_extra_token) {
/* extra? */
err = parse_extra_token((char *)c, private);
if (err < 0) {