summaryrefslogtreecommitdiff
path: root/fs/nfs/read.c
diff options
context:
space:
mode:
authorPeng Tao <bergwolf@gmail.com>2011-07-15 11:33:42 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-07-15 17:11:28 +0400
commit3b6091846d5b6113d695c79caec7cc96b62d469b (patch)
treeab842567b2afacfe019408277de88f97bf000562 /fs/nfs/read.c
parent6e4efd568574221840ee8dd86f176dc977c1330c (diff)
downloadlinux-3b6091846d5b6113d695c79caec7cc96b62d469b.tar.xz
NFS: fix return value of nfs_pagein_one/nfs_flush_one
Signed-off-by: Peng Tao <peng_tao@emc.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/read.c')
-rw-r--r--fs/nfs/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 248a55425853..581534a4aed7 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -351,12 +351,13 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc)
struct nfs_read_data *data;
struct list_head *head = &desc->pg_list;
struct pnfs_layout_segment *lseg = desc->pg_lseg;
- 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;
}