Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:27 +0100
committerJiri Slaby <jslaby@suse.cz>2019-01-18 07:53:42 +0100
commitcc929d8ca30fe4cd950aef7d57ce7b4ce58141df (patch)
treed9aaebc40a45470c0a0538aea15d14b5252ed9da
parent98e9b5e2ea85bcb58e85844436be4bbc6b2a8265 (diff)
ext4: track writeback errors using the generic tracking
infrastructure (bnc#1012628).
-rw-r--r--patches.kernel.org/4.20.3-051-ext4-track-writeback-errors-using-the-generic-.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.kernel.org/4.20.3-051-ext4-track-writeback-errors-using-the-generic-.patch b/patches.kernel.org/4.20.3-051-ext4-track-writeback-errors-using-the-generic-.patch
new file mode 100644
index 0000000000..9c4badb2c8
--- /dev/null
+++ b/patches.kernel.org/4.20.3-051-ext4-track-writeback-errors-using-the-generic-.patch
@@ -0,0 +1,39 @@
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Mon, 31 Dec 2018 00:11:07 -0500
+Subject: [PATCH] ext4: track writeback errors using the generic tracking
+ infrastructure
+References: bnc#1012628
+Patch-mainline: 4.20.3
+Git-commit: 95cb67138746451cc84cf8e516e14989746e93b0
+
+commit 95cb67138746451cc84cf8e516e14989746e93b0 upstream.
+
+We already using mapping_set_error() in fs/ext4/page_io.c, so all we
+need to do is to use file_check_and_advance_wb_err() when handling
+fsync() requests in ext4_sync_file().
+
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Cc: stable@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ fs/ext4/fsync.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
+index 87a7ff00ef62..712f00995390 100644
+--- a/fs/ext4/fsync.c
++++ b/fs/ext4/fsync.c
+@@ -164,6 +164,9 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
+ ret = err;
+ }
+ out:
++ err = file_check_and_advance_wb_err(file);
++ if (ret == 0)
++ ret = err;
+ trace_ext4_sync_file_exit(inode, ret);
+ return ret;
+ }
+--
+2.20.1
+
diff --git a/series.conf b/series.conf
index 5e7c94e54a..601cdff155 100644
--- a/series.conf
+++ b/series.conf
@@ -288,6 +288,7 @@
patches.kernel.org/4.20.3-048-ext4-fix-a-potential-fiemap-page-fault-deadloc.patch
patches.kernel.org/4.20.3-049-ext4-avoid-kernel-warning-when-writing-the-sup.patch
patches.kernel.org/4.20.3-050-ext4-use-ext4_write_inode-when-fsyncing-w-o-a-.patch
+ patches.kernel.org/4.20.3-051-ext4-track-writeback-errors-using-the-generic-.patch
########################################################
# Build fixes that apply to the vanilla kernel too.