mm: introduce and use mapping_empty()
[linux-2.6-block.git] / fs / dax.c
index b3d27fdc67752df52637bccdbde008c0086aa312..999f3f22aea3f114a7f21dd83cd47af64492e0d6 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -965,7 +965,7 @@ int dax_writeback_mapping_range(struct address_space *mapping,
        if (WARN_ON_ONCE(inode->i_blkbits != PAGE_SHIFT))
                return -EIO;
 
-       if (!mapping->nrexceptional || wbc->sync_mode != WB_SYNC_ALL)
+       if (mapping_empty(mapping) || wbc->sync_mode != WB_SYNC_ALL)
                return 0;
 
        trace_dax_writeback_range(inode, xas.xa_index, end_index);