summaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2010-09-30 20:58:31 +0200
committerSage Weil <sage@newdream.net>2010-10-21 00:38:22 +0200
commit010e3b48fca57920557d2b80b83f8b2899fb5d1e (patch)
treedf18bbb03fe34602412df792094dfbb6d6dca20e /net/ceph
parentceph: fix debugfs warnings (diff)
downloadlinux-010e3b48fca57920557d2b80b83f8b2899fb5d1e.tar.xz
linux-010e3b48fca57920557d2b80b83f8b2899fb5d1e.zip
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')
-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 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,
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) {