ceph: use seq_show_option for string type options
authorChengguang Xu <cgxu519@icloud.com>
Thu, 15 Feb 2018 07:39:05 +0000 (15:39 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 2 Apr 2018 08:12:45 +0000 (10:12 +0200)
Using seq_show_option to replace seq_printf for string type options.

Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c

index ca8a830..52fec20 100644 (file)
@@ -516,10 +516,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
        if ((fsopt->flags & CEPH_MOUNT_OPT_DCACHE) == 0)
                seq_puts(m, ",nodcache");
        if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) {
-               if (fsopt->fscache_uniq)
-                       seq_printf(m, ",fsc=%s", fsopt->fscache_uniq);
-               else
-                       seq_puts(m, ",fsc");
+               seq_show_option(m, "fsc", fsopt->fscache_uniq);
        }
        if (fsopt->flags & CEPH_MOUNT_OPT_NOPOOLPERM)
                seq_puts(m, ",nopoolperm");
@@ -532,7 +529,7 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
 #endif
 
        if (fsopt->mds_namespace)
-               seq_printf(m, ",mds_namespace=%s", fsopt->mds_namespace);
+               seq_show_option(m, "mds_namespace", fsopt->mds_namespace);
        if (fsopt->wsize)
                seq_printf(m, ",wsize=%d", fsopt->wsize);
        if (fsopt->rsize != CEPH_MAX_READ_SIZE)