From patchwork Mon Jan 30 21:52:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 9546137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A650860425 for ; Mon, 30 Jan 2017 21:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AAB6B283EB for ; Mon, 30 Jan 2017 21:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EF05283F2; Mon, 30 Jan 2017 21:53:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B94E283EB for ; Mon, 30 Jan 2017 21:53:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8AC2D81FC3; Mon, 30 Jan 2017 13:53:11 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1B58081FBC for ; Mon, 30 Jan 2017 13:53:10 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP; 30 Jan 2017 13:53:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,312,1477983600"; d="scan'208";a="59953726" Received: from theros.lm.intel.com ([10.232.112.77]) by fmsmga006.fm.intel.com with ESMTP; 30 Jan 2017 13:53:09 -0800 From: Ross Zwisler To: akpm@linux-foundation.org Subject: [PATCH] ext4: Remove unused function ext4_dax_huge_fault() Date: Mon, 30 Jan 2017 14:52:52 -0700 Message-Id: <1485813172-7284-1-git-send-email-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <148545058784.17912.6353162518188733642.stgit@djiang5-desk3.ch.intel.com> References: <148545058784.17912.6353162518188733642.stgit@djiang5-desk3.ch.intel.com> MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mawilcox@microsoft.com, linux-nvdimm@lists.01.org, dave.hansen@linux.intel.com, linux-xfs@vger.kernel.org, linux-mm@kvack.org, kirill.shutemov@linux.intel.com, jack@suse.com, linux-ext4@vger.kernel.org, vbabka@suse.cz Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP ext4_dax_pmd_fault() was renamed to ext4_dax_huge_fault() in this commit: commit 7e90fc0f8785 ("mm,fs,dax: change ->pmd_fault to ->huge_fault") However, the vm_operations_struct ops table for ext4 was modified in that commit so that .huge_fault called ext4_dax_fault(), not ext4_dax_huge_fault(). This is actually fine, though, since as of that commit ext4_dax_fault() and ext4_dax_huge_fault() are identical, both eventually calling dax_iomap_fault(). So, instead of changing the opts table to have .huge_fault call ext4_dax_huge_fault(), just leave it calling ext4_dax_fault() and remove the unused function. This fix also quiets the following compilation warning: /ext4/file.c:279:1: warning: ‘ext4_dax_huge_fault’ defined but not used [-Wunused-function] ext4_dax_huge_fault(struct vm_fault *vmf) Signed-off-by: Ross Zwisler Fixes: 7e90fc0f8785 ("mm,fs,dax: change ->pmd_fault to ->huge_fault") Cc: Dave Jiang --- Feel free to squash with 7e90fc0f8785 if that's best. The commit ID of the original patch comes from mmots/master which is currently at v4.10-rc5-mmots-2017-01-26-15-49. --- fs/ext4/file.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index ed22d20..51d7155 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -275,27 +275,6 @@ static int ext4_dax_fault(struct vm_fault *vmf) return result; } -static int -ext4_dax_huge_fault(struct vm_fault *vmf) -{ - int result; - struct inode *inode = file_inode(vmf->vma->vm_file); - struct super_block *sb = inode->i_sb; - bool write = vmf->flags & FAULT_FLAG_WRITE; - - if (write) { - sb_start_pagefault(sb); - file_update_time(vmf->vma->vm_file); - } - down_read(&EXT4_I(inode)->i_mmap_sem); - result = dax_iomap_fault(vmf, &ext4_iomap_ops); - up_read(&EXT4_I(inode)->i_mmap_sem); - if (write) - sb_end_pagefault(sb); - - return result; -} - /* * Handle write fault for VM_MIXEDMAP mappings. Similarly to ext4_dax_fault() * handler we check for races agaist truncate. Note that since we cycle through