Message ID | 1463070560-1979-2-git-send-email-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, May 12, 2016 at 06:29:14PM +0200, Jan Kara wrote: > 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> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> With the note that when we reenable PMD faults we need to either test this huge zero page path or just get rid of it and fall back to 4k zero pages. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/dax.c b/fs/dax.c index 9bc6624251b4..d7addfab2094 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -820,7 +820,7 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address, 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();
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> --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)