From patchwork Thu May 12 16:29:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9084241 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D6A97BF29F for ; Thu, 12 May 2016 16:29:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20A2C2020F for ; Thu, 12 May 2016 16:29:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D9E0201F2 for ; Thu, 12 May 2016 16:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932076AbcELQ3v (ORCPT ); Thu, 12 May 2016 12:29:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:47465 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbcELQ3d (ORCPT ); Thu, 12 May 2016 12:29:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8576EADD0; Thu, 12 May 2016 16:29:30 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 69F7D1E03F2; Thu, 12 May 2016 18:29:28 +0200 (CEST) From: Jan Kara To: linux-nvdimm@lists.01.org Cc: Ted Tso , linux-ext4@vger.kernel.org, Vishal Verma , Ross Zwisler , Dan Williams , linux-fsdevel@vger.kernel.org, Jan Kara Subject: [PATCH 1/7] dax: Fix condition for filling of PMD holes Date: Thu, 12 May 2016 18:29:14 +0200 Message-Id: <1463070560-1979-2-git-send-email-jack@suse.cz> X-Mailer: git-send-email 2.6.6 In-Reply-To: <1463070560-1979-1-git-send-email-jack@suse.cz> References: <1463070560-1979-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Ross Zwisler --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();