diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-02 12:51:51 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:09 -0400 |
commit | cf416e7ae6ea9699524cdce1a51a7cd427193203 (patch) | |
tree | 30282220cceab82e240ece2e0c74694ca62f8787 /fs/bcachefs/opts.c | |
parent | bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b (diff) | |
download | linux-cf416e7ae6ea9699524cdce1a51a7cd427193203.tar.gz linux-cf416e7ae6ea9699524cdce1a51a7cd427193203.tar.bz2 linux-cf416e7ae6ea9699524cdce1a51a7cd427193203.zip |
bcachefs: Handle weird opt string from sys_fsconfig()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/opts.c')
-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; |