From: Chengguang Xu Date: Wed, 7 Feb 2018 02:27:06 +0000 (+0800) Subject: ceph: keep consistent semantic in fscache related option combination X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7ae7a828d9ac249b175f1b6d1c21c77720cd6098;p=openwrt%2Fstaging%2Fblogic.git ceph: keep consistent semantic in fscache related option combination When specifying multiple fscache related options, the result isn't always the same as option order, this fix will keep strict consistent meaning by order. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/super.c b/fs/ceph/super.c index fb32379cd42c..ca8a830c07ad 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -314,9 +314,13 @@ static int parse_fsopt_token(char *c, void *private) break; case Opt_fscache: fsopt->flags |= CEPH_MOUNT_OPT_FSCACHE; + kfree(fsopt->fscache_uniq); + fsopt->fscache_uniq = NULL; break; case Opt_nofscache: fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE; + kfree(fsopt->fscache_uniq); + fsopt->fscache_uniq = NULL; break; case Opt_poolperm: fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM;