diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-02 18:51:51 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:09 +0200 |
commit | cf416e7ae6ea9699524cdce1a51a7cd427193203 (patch) | |
tree | 30282220cceab82e240ece2e0c74694ca62f8787 /fs/bcachefs/opts.c | |
parent | bcachefs: Assorted fixes for clang (diff) | |
download | linux-cf416e7ae6ea9699524cdce1a51a7cd427193203.tar.xz linux-cf416e7ae6ea9699524cdce1a51a7cd427193203.zip |
bcachefs: Handle weird opt string from sys_fsconfig()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to '')
-rw-r--r-- | fs/bcachefs/opts.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index 4d0daeba6f59..960bb247f3a0 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -445,6 +445,13 @@ int bch2_parse_mount_opts(struct bch_fs *c, struct bch_opts *opts, if (!options) return 0; + /* + * sys_fsconfig() is now occasionally providing us with option lists + * starting with a comma - weird. + */ + if (*options == ',') + options++; + copied_opts = kstrdup(options, GFP_KERNEL); if (!copied_opts) return -1; |