linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/2] NFS: Remove a redundant call to unmap_mapping_range()
Date: Wed, 07 Feb 2018 17:42:47 +1100	[thread overview]
Message-ID: <876079nvvc.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20180129025822.5116-1-trond.myklebust@primarydata.com>

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

On Sun, Jan 28 2018, Trond Myklebust wrote:

> We don't need to call unmap_mapping_range() prior to calling
> nfs_sync_mapping().

Don't we?
Doesn't that allow a process which mapped the page to dirty it
immediately after nfs_sync_mapping(), without the page being
reloaded from the server first?
Doesn't seem right..

Thanks,
NeilBrown


>
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
> ---
>  fs/nfs/inode.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
> index deeb7d1097d0..49fba9ea5872 100644
> --- a/fs/nfs/inode.c
> +++ b/fs/nfs/inode.c
> @@ -1170,7 +1170,6 @@ static int nfs_invalidate_mapping(struct inode *inode, struct address_space *map
>  
>  	if (mapping->nrpages != 0) {
>  		if (S_ISREG(inode->i_mode)) {
> -			unmap_mapping_range(mapping, 0, 0, 0);
>  			ret = nfs_sync_mapping(mapping);
>  			if (ret < 0)
>  				return ret;
> -- 
> 2.14.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2018-02-07  6:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29  2:58 [PATCH 1/2] NFS: Remove a redundant call to unmap_mapping_range() Trond Myklebust
2018-01-29  2:58 ` [PATCH 2/2] NFS: Fix a race between mmap() and O_DIRECT Trond Myklebust
2018-02-07  6:42 ` NeilBrown [this message]
2018-02-07 11:46   ` [PATCH 1/2] NFS: Remove a redundant call to unmap_mapping_range() Trond Myklebust
2018-02-07 21:20     ` NeilBrown

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=876079nvvc.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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;
as well as URLs for NNTP newsgroup(s).