]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/md/bcache/sysfs.c
bcache: Revert "bcache: use sysfs_match_string() instead of __sysfs_match_string()"
[mirror_ubuntu-jammy-kernel.git] / drivers / md / bcache / sysfs.c
index 9f0826712845050ab6ee3d54abe69980eb8d9216..e2059af9079181e9193795757b2ed5b448741f48 100644 (file)
@@ -23,24 +23,28 @@ static const char * const bch_cache_modes[] = {
        "writethrough",
        "writeback",
        "writearound",
-       "none"
+       "none",
+       NULL
 };
 
 /* Default is 0 ("auto") */
 static const char * const bch_stop_on_failure_modes[] = {
        "auto",
-       "always"
+       "always",
+       NULL
 };
 
 static const char * const cache_replacement_policies[] = {
        "lru",
        "fifo",
-       "random"
+       "random",
+       NULL
 };
 
 static const char * const error_actions[] = {
        "unregister",
-       "panic"
+       "panic",
+       NULL
 };
 
 write_attribute(attach);
@@ -338,7 +342,7 @@ STORE(__cached_dev)
        }
 
        if (attr == &sysfs_cache_mode) {
-               v = sysfs_match_string(bch_cache_modes, buf);
+               v = __sysfs_match_string(bch_cache_modes, -1, buf);
                if (v < 0)
                        return v;
 
@@ -349,7 +353,7 @@ STORE(__cached_dev)
        }
 
        if (attr == &sysfs_stop_when_cache_set_failed) {
-               v = sysfs_match_string(bch_stop_on_failure_modes, buf);
+               v = __sysfs_match_string(bch_stop_on_failure_modes, -1, buf);
                if (v < 0)
                        return v;
 
@@ -816,7 +820,7 @@ STORE(__bch_cache_set)
                            0, UINT_MAX);
 
        if (attr == &sysfs_errors) {
-               v = sysfs_match_string(error_actions, buf);
+               v = __sysfs_match_string(error_actions, -1, buf);
                if (v < 0)
                        return v;
 
@@ -1088,7 +1092,7 @@ STORE(__bch_cache)
        }
 
        if (attr == &sysfs_cache_replacement_policy) {
-               v = sysfs_match_string(cache_replacement_policies, buf);
+               v = __sysfs_match_string(cache_replacement_policies, -1, buf);
                if (v < 0)
                        return v;