aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Monakhov <[email protected]>2016-02-05 15:36:55 -0800
committerLinus Torvalds <[email protected]>2016-02-05 18:10:40 -0800
commitd2b2a28e640489df64cc50123f4c3c47d9ad7d13 (patch)
treeb63203e2e6f2e1737911ff7823618398f1869ab3
parentae026204a2b9060817503408906b35cefd824420 (diff)
dax: dirty inode only if required
Signed-off-by: Dmitry Monakhov <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Cc: Matthew Wilcox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/dax.c3
1 files changed, 2 insertions, 1 deletions
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);