linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trondmy@primarydata.com>
To: "neilb@suse.com" <neilb@suse.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] NFS: Remove a redundant call to unmap_mapping_range()
Date: Wed, 7 Feb 2018 11:46:48 +0000	[thread overview]
Message-ID: <1518003998.3483.0.camel@primarydata.com> (raw)
In-Reply-To: <876079nvvc.fsf@notabene.neil.brown.name>

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

On Wed, 2018-02-07 at 17:42 +1100, NeilBrown wrote:
> 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?

See line 2 of nfs_sync_mapping(). ☺

> 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
-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-02-07 11:46 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 ` [PATCH 1/2] NFS: Remove a redundant call to unmap_mapping_range() NeilBrown
2018-02-07 11:46   ` Trond Myklebust [this message]
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=1518003998.3483.0.camel@primarydata.com \
    --to=trondmy@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.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).