public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org
Cc: mawilcox-0li6OtcxBFHby3iVrkZq2A@public.gmane.org,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
	dave.hansen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	kirill.shutemov-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	jack-IBi9RG/b67k@public.gmane.org,
	linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	vbabka-AlSwsSmVLrQ@public.gmane.org
Subject: [PATCH] ext4: Remove unused function ext4_dax_huge_fault()
Date: Mon, 30 Jan 2017 14:52:52 -0700	[thread overview]
Message-ID: <1485813172-7284-1-git-send-email-ross.zwisler@linux.intel.com> (raw)
In-Reply-To: <148545058784.17912.6353162518188733642.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>

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 <ross.zwisler@linux.intel.com>
Fixes: 7e90fc0f8785 ("mm,fs,dax: change ->pmd_fault to ->huge_fault")
Cc: Dave Jiang <dave.jiang@intel.com>
---
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
-- 
2.7.4

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  parent reply	other threads:[~2017-01-30 21:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 17:09 [PATCH v2 0/3] 1G transparent hugepage support for device dax Dave Jiang
     [not found] ` <148545012634.17912.13951763606410303827.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2017-01-26 17:09   ` [PATCH v2 1/3] mm,fs,dax: Change ->pmd_fault to ->huge_fault Dave Jiang
     [not found]     ` <148545058784.17912.6353162518188733642.stgit-Cxk7aZI4ujnJARH06PadV2t3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2017-01-30 21:52       ` Ross Zwisler [this message]
2017-01-30 23:43       ` Ross Zwisler
     [not found]         ` <20170130234321.GA26702-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-01-31  0:15           ` Dave Jiang
2017-01-26 17:10   ` [PATCH v2 3/3] dax: Support for transparent PUD pages for device DAX Dave Jiang
2017-01-26 17:09 ` [PATCH v2 2/3] mm, x86: Add support for PUD-sized transparent hugepages Dave Jiang
2017-01-26 22:38   ` Andrew Morton
2017-01-26 22:46     ` Dave Jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485813172-7284-1-git-send-email-ross.zwisler@linux.intel.com \
    --to=ross.zwisler-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=dave.hansen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=jack-IBi9RG/b67k@public.gmane.org \
    --cc=kirill.shutemov-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mawilcox-0li6OtcxBFHby3iVrkZq2A@public.gmane.org \
    --cc=vbabka-AlSwsSmVLrQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox