summaryrefslogtreecommitdiffstats
path: root/drivers/block/zram
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2022-11-09 20:50:40 +0900
committerAndrew Morton <akpm@linux-foundation.org>2022-11-30 15:58:52 -0800
commit9fda785dbd14cfc7d874d00d2b007cb143aa48d0 (patch)
tree9a0b1892170b8e505cab1aae44e5480462ead3e8 /drivers/block/zram
parent60e9b39ebec56467c36c3da76eee28083196cdf1 (diff)
downloadlinux-stable-9fda785dbd14cfc7d874d00d2b007cb143aa48d0.tar.gz
linux-stable-9fda785dbd14cfc7d874d00d2b007cb143aa48d0.tar.bz2
linux-stable-9fda785dbd14cfc7d874d00d2b007cb143aa48d0.zip
zram: clarify writeback_store() comment
Re-phrase writeback BIO error comment. Link: https://lkml.kernel.org/r/20221109115047.2921851-7-senozhatsky@chromium.org Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Alexey Romanov <avromanov@sberdevices.ru> Cc: Nhat Pham <nphamcs@gmail.com> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Suleiman Souhlal <suleiman@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/block/zram')
-rw-r--r--drivers/block/zram/zram_drv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index ddbfa70ef9a3..0ca0bf330d8f 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -769,8 +769,12 @@ static ssize_t writeback_store(struct device *dev,
zram_clear_flag(zram, index, ZRAM_IDLE);
zram_slot_unlock(zram, index);
/*
- * Return last IO error unless every IO were
- * not suceeded.
+ * BIO errors are not fatal, we continue and simply
+ * attempt to writeback the remaining objects (pages).
+ * At the same time we need to signal user-space that
+ * some writes (at least one, but also could be all of
+ * them) were not successful and we do so by returning
+ * the most recent BIO error.
*/
ret = err;
continue;