* [PATCH] NFS: fix return value of nfs_pagein_one/nfs_flush_one
@ 2011-07-15 7:33 tao.peng
2011-07-15 13:07 ` Trond Myklebust
0 siblings, 1 reply; 2+ messages in thread
From: tao.peng @ 2011-07-15 7:33 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: linux-nfs
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));
--
1.7.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS: fix return value of nfs_pagein_one/nfs_flush_one
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
0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2011-07-15 13:07 UTC (permalink / raw)
To: tao.peng; +Cc: linux-nfs
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-15 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).