dax: Fix condition for filling of PMD holes
authorJan Kara <jack@suse.cz>
Thu, 12 May 2016 16:29:14 +0000 (18:29 +0200)
committerRoss Zwisler <ross.zwisler@linux.intel.com>
Thu, 19 May 2016 21:13:00 +0000 (15:13 -0600)
Currently dax_pmd_fault() decides to fill a PMD-sized hole only if
returned buffer has BH_Uptodate set. However that doesn't get set for
any mapping buffer so that branch is actually a dead code. The
BH_Uptodate check doesn't make any sense so just remove it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
fs/dax.c

index ea936b3d93dc07aaf4700e53e53a8c1851d97554..bdad05213e4b09249b6d64a63911182b608796fe 100644 (file)
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -788,7 +788,7 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address,
 
        i_mmap_lock_read(mapping);
 
 
        i_mmap_lock_read(mapping);
 
-       if (!write && !buffer_mapped(&bh) && buffer_uptodate(&bh)) {
+       if (!write && !buffer_mapped(&bh)) {
                spinlock_t *ptl;
                pmd_t entry;
                struct page *zero_page = get_huge_zero_page();
                spinlock_t *ptl;
                pmd_t entry;
                struct page *zero_page = get_huge_zero_page();