]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Fix pr_buf() calls
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 2 Apr 2022 20:30:37 +0000 (16:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:29 +0000 (17:09 -0400)
In a few places we were passing a variable to pr_buf() for the format
string - oops.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/opts.c
fs/bcachefs/util.h

index 77fbb7d2194e956738e91385066f99b7019fee24..385451ef865ef086d624b8ddac5d49c509376a79 100644 (file)
@@ -324,7 +324,7 @@ void bch2_opt_to_text(struct printbuf *out,
                if (flags & OPT_SHOW_FULL_LIST)
                        bch2_string_opt_to_text(out, opt->choices, v);
                else
-                       pr_buf(out, opt->choices[v]);
+                       pr_buf(out, "%s", opt->choices[v]);
                break;
        case BCH_OPT_FN:
                opt->to_text(out, c, sb, v);
index 085f1c35738367ae498081eb368850966531c98e..1629d279f49404e4a212cb7be2d0fff2bce90d34 100644 (file)
@@ -388,7 +388,7 @@ static inline void pr_uuid(struct printbuf *out, u8 *uuid)
        char uuid_str[40];
 
        uuid_unparse_lower(uuid, uuid_str);
-       pr_buf(out, uuid_str);
+       pr_buf(out, "%s", uuid_str);
 }
 
 int bch2_strtoint_h(const char *, int *);