public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	 Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: remove sync_mode test from nfs_writepage_locked()
Date: Thu, 07 Mar 2024 12:29:34 +0000	[thread overview]
Message-ID: <286ecab7990b36447fbbca37d211b390130c3adb.camel@kernel.org> (raw)
In-Reply-To: <170907510763.24797.12414304736328194537@noble.neil.brown.name>

On Wed, 2024-02-28 at 10:05 +1100, NeilBrown wrote:
> nfs_writepage_locked() is only called from nfs_wb_folio() (since Commit
> 12fc0a963128 ("nfs: Remove writepage")) so ->sync_mode is always
> WB_SYNC_ALL.
> 
> This means the test for WB_SYNC_NONE is dead code and can be removed.
> 
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
>  fs/nfs/write.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index bb79d3a886ae..58adbb7709ba 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -667,10 +667,6 @@ static int nfs_writepage_locked(struct folio *folio,
>  	struct inode *inode = folio_file_mapping(folio)->host;
>  	int err;
>  
> -	if (wbc->sync_mode == WB_SYNC_NONE &&
> -	    NFS_SERVER(inode)->write_congested)
> -		return AOP_WRITEPAGE_ACTIVATE;
> -
>  	nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE);
>  	nfs_pageio_init_write(&pgio, inode, 0, false,
>  			      &nfs_async_write_completion_ops);

Reviewed-by: Jeff Layton <jlayton@kernel.org>

      reply	other threads:[~2024-03-07 12:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 23:05 [PATCH] NFS: remove sync_mode test from nfs_writepage_locked() NeilBrown
2024-03-07 12:29 ` Jeff Layton [this message]

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=286ecab7990b36447fbbca37d211b390130c3adb.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trond.myklebust@hammerspace.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