Although we store NULL here, there aren't any marks set on the entry so use xas_store_noinit() to save some time when trying to reinitialize marks. Furthermore we actually overwrite the entry shortly afterwards with new PTE entry anyway. Signed-off-by: Jan Kara <jack@xxxxxxx> --- fs/dax.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index f8358928549c..03c6ca693f3c 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -523,7 +523,11 @@ static void *grab_mapping_entry(struct xa_state *xas, } dax_disassociate_entry(entry, mapping, false); - xas_store(xas, NULL); /* undo the PMD join */ + /* + * Remove PMD entry. There should be no marks set for the entry + * so don't bother reinitializing them with xas_erase(). + */ + xas_store_noinit(xas, NULL); dax_wake_entry(xas, entry, true); mapping->nrexceptional--; entry = NULL; -- 2.16.4