4.11-stable review patch. If anyone has any objections, please let me know.
------------------ From: Jan Kara <[email protected]> commit 1eb643d02b21412e603b42cdd96010a2ac31c05f upstream. dax_writeback_mapping_range() fails to update iteration index when searching radix tree for entries needing cache flushing. Thus each pagevec worth of entries is searched starting from the start which is inefficient and prone to livelocks. Update index properly. Link: http://lkml.kernel.org/r/[email protected] Fixes: 9973c98ecfda3 ("dax: add support for fsync/sync") Signed-off-by: Jan Kara <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- fs/dax.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/dax.c +++ b/fs/dax.c @@ -875,6 +875,7 @@ int dax_writeback_mapping_range(struct a if (ret < 0) return ret; } + start_index = indices[pvec.nr - 1] + 1; } return 0; }

