summaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@icloud.com>2018-02-07 10:27:06 +0800
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 10:12:45 +0200
commit7ae7a828d9ac249b175f1b6d1c21c77720cd6098 (patch)
treeb5fdf45a4e66c18ce7bfc6a946a06725e702418a /fs/ceph/super.c
parent4c069a5821ddc568e9509f49fcc9481c8a43712f (diff)
downloadlinux-7ae7a828d9ac249b175f1b6d1c21c77720cd6098.tar.gz
linux-7ae7a828d9ac249b175f1b6d1c21c77720cd6098.tar.bz2
linux-7ae7a828d9ac249b175f1b6d1c21c77720cd6098.zip
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 <cgxu519@icloud.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r--fs/ceph/super.c4
1 files changed, 4 insertions, 0 deletions
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;