From: Dmitry Monakhov Date: Fri, 5 Feb 2016 23:36:55 +0000 (-0800) Subject: dax: dirty inode only if required X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2b2a28e640489df64cc50123f4c3c47d9ad7d13;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dax: dirty inode only if required Signed-off-by: Dmitry Monakhov Reviewed-by: Jan Kara Reviewed-by: Ross Zwisler Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/dax.c b/fs/dax.c index e0e9358baf35..fc2e3141138b 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -358,7 +358,8 @@ static int dax_radix_entry(struct address_space *mapping, pgoff_t index, void *entry; WARN_ON_ONCE(pmd_entry && !dirty); - __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); + if (dirty) + __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); spin_lock_irq(&mapping->tree_lock);