aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-20 14:59:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-20 14:59:34 -0400
commit49ccf74aaf6b53751dc0ae06ded9bb39343da822 (patch)
tree1c1c362bc870ea74c3aa6db9bd85b14f1bd68c9d /fs
parent45ddfbf9594a344dfecbb320d74636023d813539 (diff)
parentf8512ad0da16cbe156f3a7627971cdf0b39c4138 (diff)
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: nfs: don't ignore return value from nfs_pageio_add_request
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/read.c5
-rw-r--r--fs/nfs/write.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 3d7d9631e125..5a70be589bbe 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -533,7 +533,10 @@ readpage_async_filler(void *data, struct page *page)
533 533
534 if (len < PAGE_CACHE_SIZE) 534 if (len < PAGE_CACHE_SIZE)
535 zero_user_segment(page, len, PAGE_CACHE_SIZE); 535 zero_user_segment(page, len, PAGE_CACHE_SIZE);
536 nfs_pageio_add_request(desc->pgio, new); 536 if (!nfs_pageio_add_request(desc->pgio, new)) {
537 error = desc->pgio->pg_error;
538 goto out_unlock;
539 }
537 return 0; 540 return 0;
538out_error: 541out_error:
539 error = PTR_ERR(new); 542 error = PTR_ERR(new);
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 80c61fdb2720..bed63416a55b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -39,6 +39,7 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context*,
39 unsigned int, unsigned int); 39 unsigned int, unsigned int);
40static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc, 40static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc,
41 struct inode *inode, int ioflags); 41 struct inode *inode, int ioflags);
42static void nfs_redirty_request(struct nfs_page *req);
42static const struct rpc_call_ops nfs_write_partial_ops; 43static const struct rpc_call_ops nfs_write_partial_ops;
43static const struct rpc_call_ops nfs_write_full_ops; 44static const struct rpc_call_ops nfs_write_full_ops;
44static const struct rpc_call_ops nfs_commit_ops; 45static const struct rpc_call_ops nfs_commit_ops;
@@ -288,7 +289,12 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
288 BUG(); 289 BUG();
289 } 290 }
290 spin_unlock(&inode->i_lock); 291 spin_unlock(&inode->i_lock);
291 nfs_pageio_add_request(pgio, req); 292 if (!nfs_pageio_add_request(pgio, req)) {
293 nfs_redirty_request(req);
294 nfs_end_page_writeback(page);
295 nfs_clear_page_tag_locked(req);
296 return pgio->pg_error;
297 }
292 return 0; 298 return 0;
293} 299}
294 300