2014-07-03 06:18:49

by Zhang Zhen

[permalink] [raw]
Subject: [PATCH v2] ext4: remove readpage() check up for mmap file

There is no kind of file does not supply page reading function.

Change v1 -> v2:
- deleted the mapping variable

Signed-off-by: Zhang Zhen <[email protected]>
---
fs/ext4/file.c | 4 ----
1 file changed, 4 deletions(-)

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;


2014-07-15 14:09:04

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH v2] ext4: remove readpage() check up for mmap file

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

2014-07-15 14:16:48

by Matthew Wilcox

[permalink] [raw]
Subject: RE: [PATCH v2] ext4: remove readpage() check up for mmap file

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.
________________________________________
From: Theodore Ts'o [[email protected]]
Sent: July 15, 2014 6:43 AM
To: Zhang Zhen
Cc: [email protected]; [email protected]; Zwisler, Ross; Wilcox, Matthew R
Subject: Re: [PATCH v2] ext4: remove readpage() check up for mmap file

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

2014-07-15 16:16:31

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH v2] ext4: remove readpage() check up for mmap file

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