diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-19 17:59:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-19 17:59:44 -0400 |
commit | c7c350e92aab1bba68f26a6027b734adcf9824ba (patch) | |
tree | aa99bd94c3049dd871d9c030d70a5f3d87591a95 /fs/nfs | |
parent | 2f42b5d043ee271d1e5d30ecd77186b6c4d4e534 (diff) | |
parent | f8512ad0da16cbe156f3a7627971cdf0b39c4138 (diff) |
Merge branch 'hotfixes' into devel
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/read.c | 5 | ||||
-rw-r--r-- | fs/nfs/write.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index be9e8270f4d7..ab2f7d233e01 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -531,7 +531,10 @@ readpage_async_filler(void *data, struct page *page) | |||
531 | 531 | ||
532 | if (len < PAGE_CACHE_SIZE) | 532 | if (len < PAGE_CACHE_SIZE) |
533 | zero_user_segment(page, len, PAGE_CACHE_SIZE); | 533 | zero_user_segment(page, len, PAGE_CACHE_SIZE); |
534 | nfs_pageio_add_request(desc->pgio, new); | 534 | if (!nfs_pageio_add_request(desc->pgio, new)) { |
535 | error = desc->pgio->pg_error; | ||
536 | goto out_unlock; | ||
537 | } | ||
535 | return 0; | 538 | return 0; |
536 | out_error: | 539 | out_error: |
537 | error = PTR_ERR(new); | 540 | error = PTR_ERR(new); |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1667e3984418..4cb88df12f83 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); |
40 | static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc, | 40 | static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc, |
41 | struct inode *inode, int ioflags); | 41 | struct inode *inode, int ioflags); |
42 | static void nfs_redirty_request(struct nfs_page *req); | ||
42 | static const struct rpc_call_ops nfs_write_partial_ops; | 43 | static const struct rpc_call_ops nfs_write_partial_ops; |
43 | static const struct rpc_call_ops nfs_write_full_ops; | 44 | static const struct rpc_call_ops nfs_write_full_ops; |
44 | static const struct rpc_call_ops nfs_commit_ops; | 45 | static const struct rpc_call_ops nfs_commit_ops; |
@@ -279,7 +280,12 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio, | |||
279 | BUG(); | 280 | BUG(); |
280 | } | 281 | } |
281 | spin_unlock(&inode->i_lock); | 282 | spin_unlock(&inode->i_lock); |
282 | nfs_pageio_add_request(pgio, req); | 283 | if (!nfs_pageio_add_request(pgio, req)) { |
284 | nfs_redirty_request(req); | ||
285 | nfs_end_page_writeback(page); | ||
286 | nfs_clear_page_tag_locked(req); | ||
287 | return pgio->pg_error; | ||
288 | } | ||
283 | return 0; | 289 | return 0; |
284 | } | 290 | } |
285 | 291 | ||