linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: tao.peng@emc.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: fix return value of nfs_pagein_one/nfs_flush_one
Date: Fri, 15 Jul 2011 09:07:26 -0400	[thread overview]
Message-ID: <1310735246.4381.1.camel@lade.trondhjem.org> (raw)
In-Reply-To: <F19688880B763E40B28B2B462677FBF805BEFF0EF1@MX09A.corp.emc.com>

On Fri, 2011-07-15 at 03:33 -0400, tao.peng@emc.com wrote: 
> From: Peng Tao <bergwolf@gmail.com>
> 
> Signed-off-by: Peng Tao <peng_tao@emc.com>
> ---
> This applies to Trond's nfs-for-next branch. Should some minor typos.
>  fs/nfs/read.c  |    3 ++-
>  fs/nfs/write.c |    2 +-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/read.c b/fs/nfs/read.c
> index 1472933..7cba228 100644
> --- a/fs/nfs/read.c
> +++ b/fs/nfs/read.c
> @@ -342,12 +342,13 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc, struct list_head *
>  	struct page		**pages;
>  	struct nfs_read_data	*data;
>  	struct list_head *head = &desc->pg_list;
> -	int ret = -ENOMEM;
> +	int ret = 0;
>  
>  	data = nfs_readdata_alloc(nfs_page_array_len(desc->pg_base,
>  						     desc->pg_count));
>  	if (!data) {
>  		nfs_async_read_error(head);
> +		ret = -ENOMEM;
>  		goto out;
>  	}
>  
> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index 525fb02..9fba527 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -992,7 +992,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc, struct list_head *r
>  	struct page		**pages;
>  	struct nfs_write_data	*data;
>  	struct list_head *head = &desc->pg_list;
> -	int ret;
> +	int ret = 0;
>  
>  	data = nfs_writedata_alloc(nfs_page_array_len(desc->pg_base,
>  						      desc->pg_count));

Agreed. I think I'd like to insert this patch a little bit earlier in
the series so that we don't break bisectability.

Cheers
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com


      reply	other threads:[~2011-07-15 13:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15  7:33 [PATCH] NFS: fix return value of nfs_pagein_one/nfs_flush_one tao.peng
2011-07-15 13:07 ` Trond Myklebust [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=1310735246.4381.1.camel@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tao.peng@emc.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).