[PATCH] NFS: fix return value of nfs_pagein_one/nfs_flush_one

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Peng Tao <bergwolf@xxxxxxxxx>

Signed-off-by: Peng Tao <peng_tao@xxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux