diff for duplicates of <20200131061207.E7adnxJhj%akpm@linux-foundation.org>
diff --git a/a/1.txt b/N1/1.txt
index 5415e72..e0f03d0 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -73,4 +73,23 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
- }
- return err;
-}
--EXPORT_SYMBOL(filemap_write_and_wait);
\ No newline at end of file
+-EXPORT_SYMBOL(filemap_write_and_wait);
+-
+ /**
+ * filemap_write_and_wait_range - write out & wait on a file range
+ * @mapping: the address_space for the pages
+@@ -680,7 +653,12 @@ int filemap_write_and_wait_range(struct
+ if (mapping_needs_writeback(mapping)) {
+ err = __filemap_fdatawrite_range(mapping, lstart, lend,
+ WB_SYNC_ALL);
+- /* See comment of filemap_write_and_wait() */
++ /*
++ * Even if the above returned error, the pages may be
++ * written partially (e.g. -ENOSPC), so we wait for it.
++ * But the -EIO is special case, it may indicate the worst
++ * thing (e.g. bug) happened, so we avoid waiting for it.
++ */
+ if (err != -EIO) {
+ int err2 = filemap_fdatawait_range(mapping,
+ lstart, lend);
+_
\ No newline at end of file
diff --git a/a/content_digest b/N1/content_digest
index 3593e31..2d72b43 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -101,7 +101,26 @@
"-\t}\n",
"-\treturn err;\n",
"-}\n",
- "-EXPORT_SYMBOL(filemap_write_and_wait);"
+ "-EXPORT_SYMBOL(filemap_write_and_wait);\n",
+ "-\n",
+ " /**\n",
+ " * filemap_write_and_wait_range - write out & wait on a file range\n",
+ " * \@mapping:\tthe address_space for the pages\n",
+ "\@\@ -680,7 +653,12 \@\@ int filemap_write_and_wait_range(struct\n",
+ " \tif (mapping_needs_writeback(mapping)) {\n",
+ " \t\terr = __filemap_fdatawrite_range(mapping, lstart, lend,\n",
+ " \t\t\t\t\t\t WB_SYNC_ALL);\n",
+ "-\t\t/* See comment of filemap_write_and_wait() */\n",
+ "+\t\t/*\n",
+ "+\t\t * Even if the above returned error, the pages may be\n",
+ "+\t\t * written partially (e.g. -ENOSPC), so we wait for it.\n",
+ "+\t\t * But the -EIO is special case, it may indicate the worst\n",
+ "+\t\t * thing (e.g. bug) happened, so we avoid waiting for it.\n",
+ "+\t\t */\n",
+ " \t\tif (err != -EIO) {\n",
+ " \t\t\tint err2 = filemap_fdatawait_range(mapping,\n",
+ " \t\t\t\t\t\tlstart, lend);\n",
+ "_"
]
-284164da892ed8955bbf10b1bd012dbaf755b339f26d214e525ddabcba734c36
+cfeb59cd766c1fc2dc19293564516a72c897d71b679fbd088f1aebb38f8b5faf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.