btrfs: manage check_int_print_mask mount option as %u
authorAnand Jain <anand.jain@oracle.com>
Tue, 13 Feb 2018 09:50:45 +0000 (17:50 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Mar 2018 13:09:33 +0000 (15:09 +0200)
As check_int_print_mask mount option is unsigned so manage it as %u for
token verifications, instead of %d.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c

index 79900e1135d2317e010b34b48eae903d0de21426..d3a49b8c760b07c52b81d01f110f61e52e6b75ce 100644 (file)
@@ -381,7 +381,7 @@ static const match_table_t tokens = {
        {Opt_skip_balance, "skip_balance"},
        {Opt_check_integrity, "check_int"},
        {Opt_check_integrity_including_extent_data, "check_int_data"},
-       {Opt_check_integrity_print_mask, "check_int_print_mask=%d"},
+       {Opt_check_integrity_print_mask, "check_int_print_mask=%u"},
        {Opt_rescan_uuid_tree, "rescan_uuid_tree"},
        {Opt_fatal_errors, "fatal_errors=%s"},
        {Opt_commit_interval, "commit=%d"},
@@ -756,17 +756,11 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
                        break;
                case Opt_check_integrity_print_mask:
                        ret = match_int(&args[0], &intarg);
-                       if (ret) {
-                               goto out;
-                       } else if (intarg >= 0) {
-                               info->check_integrity_print_mask = intarg;
-                               btrfs_info(info,
-                                          "check_integrity_print_mask 0x%x",
-                                          info->check_integrity_print_mask);
-                       } else {
-                               ret = -EINVAL;
+                       if (ret)
                                goto out;
-                       }
+                       info->check_integrity_print_mask = intarg;
+                       btrfs_info(info, "check_integrity_print_mask 0x%x",
+                                  info->check_integrity_print_mask);
                        break;
 #else
                case Opt_check_integrity_including_extent_data: