]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/ceph/ceph_common.c
fs: create and use seq_show_option for escaping
[mirror_ubuntu-jammy-kernel.git] / net / ceph / ceph_common.c
index f30329f726418bdc2e82bb5aced4c3634e215850..69a4d30a9ccf44900961e0691d942acfb4262201 100644 (file)
@@ -517,8 +517,11 @@ int ceph_print_client_options(struct seq_file *m, struct ceph_client *client)
        struct ceph_options *opt = client->options;
        size_t pos = m->count;
 
-       if (opt->name)
-               seq_printf(m, "name=%s,", opt->name);
+       if (opt->name) {
+               seq_puts(m, "name=");
+               seq_escape(m, opt->name, ", \t\n\\");
+               seq_putc(m, ',');
+       }
        if (opt->key)
                seq_puts(m, "secret=<hidden>,");