diff mbox

[v2] ext4: remove readpage() check up for mmap file

Message ID 53B4F5B7.7060209@huawei.com
State Accepted, archived
Headers show

Commit Message

ZhangZhen July 3, 2014, 6:18 a.m. UTC
There is no kind of file does not supply page reading function.

Change v1 -> v2:
- deleted the mapping variable

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 fs/ext4/file.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Theodore Ts'o July 15, 2014, 1:43 p.m. UTC | #1
On Thu, Jul 03, 2014 at 02:18:31PM +0800, Zhang Zhen wrote:
> There is no kind of file does not supply page reading function.

The code in question originally came from ext2, when the a_ops used in
XIP mode did not have a readpage function.  And since there is an
outstanding XIP patch set that Matthew Wilcox has been working on, I
was going to NACK this.  Howeveer, it looks like the lines in question
are getting removed in the most recent version of the XIP patch set
that I've seen, so it it seems the only problem is this will cause a
minor patch conflict with XIP.

So I'll accept this, and assume the XIP folks aren't going to object....

   	       	     	 	    	- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Matthew Wilcox July 15, 2014, 2:16 p.m. UTC | #2
Are you sure about the origins of that check, Ted?  It's not there in current ext2, and current XIP code calls the generic xip_file_mmap() method, not an ext2/4 specific one.

In any case, yes, no objection from my side to removing this check.
Theodore Ts'o July 15, 2014, 4:16 p.m. UTC | #3
On Tue, Jul 15, 2014 at 02:16:40PM +0000, Wilcox, Matthew R wrote:
> Are you sure about the origins of that check, Ted?  It's not there
> in current ext2, and current XIP code calls the generic
> xip_file_mmap() method, not an ext2/4 specific one.

That was my memory, but I admit I haven't gone diving into the pre-git
linux-history tree to make sure.....

But in any case, the only possible potential conflict would have been
on the XIP patch set, and it doesn't seem to be an issue there.

(BTW, what's the current status on the XIP patch set?  I admit I've
gotten too busy to track its status lately.  There were a bunch of
comments from mm and core vfs folks, but that was a while ago.  What's
still left to be resolved at this point?)

      	      	 	     	  - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 8695f70..aca7b24 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -200,10 +200,6 @@  static const struct vm_operations_struct ext4_file_vm_ops = {

 static int ext4_file_mmap(struct file *file, struct vm_area_struct *vma)
 {
-	struct address_space *mapping = file->f_mapping;
-
-	if (!mapping->a_ops->readpage)
-		return -ENOEXEC;
 	file_accessed(file);
 	vma->vm_ops = &ext4_file_vm_ops;
 	return 0;