summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2017-05-04 09:35:02 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2017-05-05 13:42:48 +1000
commitda03d7bdd09cc3e6d6e0fcb07a29554158dac98c (patch)
treec17c6770b919ce9927167f830849f0e115c2c608
parenteb4efa3f9fe9e5b9d284b970d6fb631a15719a9f (diff)
downloadlinux-next-da03d7bdd09cc3e6d6e0fcb07a29554158dac98c.tar.gz
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);