Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColy Li <colyli@suse.de>2019-08-09 14:42:58 +0800
committerColy Li <colyli@suse.de>2019-08-09 14:42:58 +0800
commit191d6c3103c62f6ea24634d5fe57838d4649a9b5 (patch)
tree931af88a0d5cfd5e9aebf2aa384f3e6da68e9606
parentfbff281d9c4efb89f326f9fdff9ffde1948c312e (diff)
- Delete for bsc#1144979: bcache: kernel oops on reading sysfs cache_mode file
patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch. - Refresh for the above change, patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch.
-rw-r--r--patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch102
-rw-r--r--patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch4
-rw-r--r--series.conf1
3 files changed, 2 insertions, 105 deletions
diff --git a/patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch b/patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch
deleted file mode 100644
index f3289af8cb..0000000000
--- a/patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 89e0341af082dbc170019f908846f4a424efc86b Mon Sep 17 00:00:00 2001
-From: Alexandru Ardelean <alexandru.ardelean@analog.com>
-Date: Fri, 28 Jun 2019 19:59:32 +0800
-Subject: [PATCH] bcache: use sysfs_match_string() instead of
- __sysfs_match_string()
-Git-commit: 89e0341af082dbc170019f908846f4a424efc86b
-References: bsc#1140652
-Patch-mainline: v5.3-rc1
-
-The arrays (of strings) that are passed to __sysfs_match_string() are
-static, so use sysfs_match_string() which does an implicit ARRAY_SIZE()
-over these arrays.
-
-Functionally, this doesn't change anything.
-The change is more cosmetic.
-
-It only shrinks the static arrays by 1 byte each.
-
-Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
-Signed-off-by: Coly Li <colyli@suse.de>
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-
----
- drivers/md/bcache/sysfs.c | 20 ++++++++------------
- 1 file changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
-index bfb437ffb13c..760cf8951338 100644
---- a/drivers/md/bcache/sysfs.c
-+++ b/drivers/md/bcache/sysfs.c
-@@ -21,28 +21,24 @@ static const char * const bch_cache_modes[] = {
- "writethrough",
- "writeback",
- "writearound",
-- "none",
-- NULL
-+ "none"
- };
-
- /* Default is 0 ("auto") */
- static const char * const bch_stop_on_failure_modes[] = {
- "auto",
-- "always",
-- NULL
-+ "always"
- };
-
- static const char * const cache_replacement_policies[] = {
- "lru",
- "fifo",
-- "random",
-- NULL
-+ "random"
- };
-
- static const char * const error_actions[] = {
- "unregister",
-- "panic",
-- NULL
-+ "panic"
- };
-
- write_attribute(attach);
-@@ -333,7 +329,7 @@ STORE(__cached_dev)
- bch_cached_dev_run(dc);
-
- if (attr == &sysfs_cache_mode) {
-- v = __sysfs_match_string(bch_cache_modes, -1, buf);
-+ v = sysfs_match_string(bch_cache_modes, buf);
- if (v < 0)
- return v;
-
-@@ -344,7 +340,7 @@ STORE(__cached_dev)
- }
-
- if (attr == &sysfs_stop_when_cache_set_failed) {
-- v = __sysfs_match_string(bch_stop_on_failure_modes, -1, buf);
-+ v = sysfs_match_string(bch_stop_on_failure_modes, buf);
- if (v < 0)
- return v;
-
-@@ -799,7 +795,7 @@ STORE(__bch_cache_set)
- 0, UINT_MAX);
-
- if (attr == &sysfs_errors) {
-- v = __sysfs_match_string(error_actions, -1, buf);
-+ v = sysfs_match_string(error_actions, buf);
- if (v < 0)
- return v;
-
-@@ -1063,7 +1059,7 @@ STORE(__bch_cache)
- }
-
- if (attr == &sysfs_cache_replacement_policy) {
-- v = __sysfs_match_string(cache_replacement_policies, -1, buf);
-+ v = sysfs_match_string(cache_replacement_policies, buf);
- if (v < 0)
- return v;
-
---
-2.16.4
-
diff --git a/patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch b/patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch
index 25f5ceacda..662c1b94ba 100644
--- a/patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch
+++ b/patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch
@@ -137,7 +137,7 @@ Signed-off-by: Jens Axboe <axboe@kernel.dk>
/* Flash only volumes */
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
-@@ -324,8 +324,11 @@ STORE(__cached_dev)
+@@ -328,8 +328,11 @@ STORE(__cached_dev)
bch_cache_accounting_clear(&dc->accounting);
if (attr == &sysfs_running &&
@@ -150,4 +150,4 @@ Signed-off-by: Jens Axboe <axboe@kernel.dk>
+ }
if (attr == &sysfs_cache_mode) {
- v = sysfs_match_string(bch_cache_modes, buf);
+ v = __sysfs_match_string(bch_cache_modes, -1, buf);
diff --git a/series.conf b/series.conf
index 59bd41f07e..936f966a1d 100644
--- a/series.conf
+++ b/series.conf
@@ -23049,7 +23049,6 @@
patches.suse/0028-bcache-ignore-read-ahead-request-failure-on-backing-.patch
patches.suse/0029-bcache-add-io-error-counting-in-write_bdev_super_end.patch
patches.suse/0030-bcache-remove-unnecessary-prefetch-in-bset_search_tr.patch
- patches.suse/0031-bcache-use-sysfs_match_string-instead-of-__sysfs_mat.patch
patches.suse/0032-bcache-add-return-value-check-to-bch_cached_dev_run.patch
patches.suse/0033-bcache-remove-unncessary-code-in-bch_btree_keys_init.patch
patches.suse/0034-bcache-check-CACHE_SET_IO_DISABLE-in-allocator-code.patch