summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-19 17:59:44 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-03-19 17:59:44 -0400
commitc7c350e92aab1bba68f26a6027b734adcf9824ba (patch)
treeaa99bd94c3049dd871d9c030d70a5f3d87591a95 /fs/nfs/write.c
parent2f42b5d043ee271d1e5d30ecd77186b6c4d4e534 (diff)
parentf8512ad0da16cbe156f3a7627971cdf0b39c4138 (diff)
Merge branch 'hotfixes' into devel
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c8
1 files changed, 7 insertions, 1 deletions
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*,
unsigned int, unsigned int);
static void nfs_pageio_init_write(struct nfs_pageio_descriptor *desc,
struct inode *inode, int ioflags);
+static void nfs_redirty_request(struct nfs_page *req);
static const struct rpc_call_ops nfs_write_partial_ops;
static const struct rpc_call_ops nfs_write_full_ops;
static const struct rpc_call_ops nfs_commit_ops;
@@ -279,7 +280,12 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
BUG();
}
spin_unlock(&inode->i_lock);
- nfs_pageio_add_request(pgio, req);
+ if (!nfs_pageio_add_request(pgio, req)) {
+ nfs_redirty_request(req);
+ nfs_end_page_writeback(page);
+ nfs_clear_page_tag_locked(req);
+ return pgio->pg_error;
+ }
return 0;
}