Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46097
b: refs/heads/master
c: a301b77
h: refs/heads/master
i:
  46095: 0687400
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 13, 2007
1 parent 25d8005 commit 9e08df7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0c4fddca2bc3967381b728732a8850de35e1b20
refs/heads/master: a301b777714087ea1d63dbec0173a13d416cd7a9
15 changes: 10 additions & 5 deletions trunk/fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ static void nfs_grow_file(struct page *page, unsigned int offset, unsigned int c
i_size_write(inode, end);
}

/* A writeback failed: mark the page as bad, and invalidate the page cache */
static void nfs_set_pageerror(struct page *page)
{
SetPageError(page);
nfs_zap_mapping(page->mapping->host, page->mapping);
}

/* We can set the PG_uptodate flag if we see that a write request
* covers the full page.
*/
Expand Down Expand Up @@ -714,7 +721,7 @@ int nfs_updatepage(struct file *file, struct page *page,
dprintk("NFS: nfs_updatepage returns %d (isize %Ld)\n",
status, (long long)i_size_read(inode));
if (status < 0)
ClearPageUptodate(page);
nfs_set_pageerror(page);
return status;
}

Expand Down Expand Up @@ -976,8 +983,7 @@ static void nfs_writeback_done_partial(struct rpc_task *task, void *calldata)
return;

if (task->tk_status < 0) {
ClearPageUptodate(page);
SetPageError(page);
nfs_set_pageerror(page);
req->wb_context->error = task->tk_status;
dprintk(", error = %d\n", task->tk_status);
} else {
Expand Down Expand Up @@ -1034,8 +1040,7 @@ static void nfs_writeback_done_full(struct rpc_task *task, void *calldata)
(long long)req_offset(req));

if (task->tk_status < 0) {
ClearPageUptodate(page);
SetPageError(page);
nfs_set_pageerror(page);
req->wb_context->error = task->tk_status;
end_page_writeback(page);
nfs_inode_remove_request(req);
Expand Down

0 comments on commit 9e08df7

Please sign in to comment.