[Top] [All Lists]

Re: [PATCH] xfs: Add readpage() check up for mmap file at xfs_file_mmap(

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: Add readpage() check up for mmap file at xfs_file_mmap()
From: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date: Thu, 19 Jul 2012 10:59:37 +0800
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120718151148.GA17374@xxxxxxxxxxxxx>
Organization: Oracle
References: <5006CC80.3070208@xxxxxxxxxx> <20120718151148.GA17374@xxxxxxxxxxxxx>
Reply-to: jeff.liu@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20120313 Thunderbird/3.1.20
On 07/18/2012 11:11 PM, Christoph Hellwig wrote:

> On Wed, Jul 18, 2012 at 10:47:28PM +0800, Jeff Liu wrote:
>> Hello,
>> When studying XFS code, I found xfs_file_mmap() does not check whether a 
>> specific file has readpage() or not.
>> Actually, I have no idea of which kind of file does not supply page reading 
>> function, but Btrfs/Ext4
>> as well as generic_file_mmap() all do this check at first, do we also need a 
>> defense here?
> It's not needed. In generic_file_mmap it might make a little sense as
> any filesystem could use it, but even there's it's questionable because
> ->readpage is the only way to actually supposed mmap when using
> generic_file_mmap.

Now I got it, thanks for the teaching.


> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>