]> git.baikalelectronics.ru Git - kernel.git/commit
fs/dax.c: fix inefficiency in dax_writeback_mapping_range()
authorJan Kara <jack@suse.cz>
Fri, 23 Jun 2017 22:08:46 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Jun 2017 23:15:55 +0000 (16:15 -0700)
commitd85d6b0df93c08f43c07a16499856ede602d03e3
treeaa77fd98679a5916f1dbc620d389f6d4146ff71e
parentb7a496892bd2781b3626b254e7673f19a8f1eaaa
fs/dax.c: fix inefficiency in dax_writeback_mapping_range()

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/20170619124531.21491-1-jack@suse.cz
Fixes: e3d2e8c1185b6 ("dax: add support for fsync/sync")
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dax.c