|
@@ -499,14 +499,14 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
|
|
|
btrfs_test_opt(info, FORCE_COMPRESS);
|
|
|
if (token == Opt_compress ||
|
|
|
token == Opt_compress_force ||
|
|
|
- strcmp(args[0].from, "zlib") == 0) {
|
|
|
+ strncmp(args[0].from, "zlib", 4) == 0) {
|
|
|
compress_type = "zlib";
|
|
|
info->compress_type = BTRFS_COMPRESS_ZLIB;
|
|
|
btrfs_set_opt(info->mount_opt, COMPRESS);
|
|
|
btrfs_clear_opt(info->mount_opt, NODATACOW);
|
|
|
btrfs_clear_opt(info->mount_opt, NODATASUM);
|
|
|
no_compress = 0;
|
|
|
- } else if (strcmp(args[0].from, "lzo") == 0) {
|
|
|
+ } else if (strncmp(args[0].from, "lzo", 3) == 0) {
|
|
|
compress_type = "lzo";
|
|
|
info->compress_type = BTRFS_COMPRESS_LZO;
|
|
|
btrfs_set_opt(info->mount_opt, COMPRESS);
|