dax: Flush partial PMDs correctly
authorMatthew Wilcox <willy@infradead.org>
Fri, 1 Mar 2019 19:12:41 +0000 (11:12 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 2 Mar 2019 01:24:48 +0000 (17:24 -0800)
commite4b3448bc346fedf36db64124a664a959995b085
treeb87a9328845723417fb3fec53b6403945a6b8009
parent0cefc36b32b3a9ee9da9bd055810bf331e4243dd
dax: Flush partial PMDs correctly

The radix tree would rewind the index in an iterator to the lowest index
of a multi-slot entry.  The XArray iterators instead leave the index
unchanged, but I overlooked that when converting DAX from the radix tree
to the XArray.  Adjust the index that we use for flushing to the start
of the PMD range.

Fixes: c1901cd33cf4 ("page cache: Convert find_get_entries_tag to XArray")
Cc: <stable@vger.kernel.org>
Reported-by: Piotr Balcer <piotr.balcer@intel.com>
Tested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
fs/dax.c