aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2017-04-27 09:58:08 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-04-28 16:43:54 +1000
commit2c4c6983a3ad4cb621b5feaa21518557bd5cc5e6 (patch)
tree1dfee766ed3cdb24fa068e1841b5aa26e3d4b028
parentf6acfc9582e907b2a24c91a79c189446baa27a83 (diff)
dax: fix regression in dax_writeback_mapping_range()
commit 354ae7432ee8 ("dax: add tracepoints to dax_writeback_mapping_range()") in the -next tree, which appears in next-20170310, inadvertently changed dax_writeback_mapping_range() so that it could end up returning a positive value: the number of bytes flushed, as returned by dax_writeback_one(). This was incorrect. This function either needs to return a negative error value, or zero on success. This change was causing xfstest failures, as reported by Xiong: https://lkml.org/lkml/2017/3/13/1220 With this fix applied to next-20170310, all the test failures reported by Xiong (generic/075 generic/112 generic/127 generic/231 generic/263) are resolved. Link: http://lkml.kernel.org/r/20170314215358.31451-1-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reported-by: Xiong Zhou <xzhou@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--fs/dax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dax.c b/fs/dax.c
index 5dd7b286c091..7cf2686761e2 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -891,7 +891,7 @@ int dax_writeback_mapping_range(struct address_space *mapping,
out:
put_dax(dax_dev);
trace_dax_writeback_range_done(inode, start_index, end_index);
- return ret;
+ return (ret < 0 ? ret : 0);
}
EXPORT_SYMBOL_GPL(dax_writeback_mapping_range);