aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 2c68818f68ac..c07462320f6b 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -682,7 +682,8 @@ static struct nfs_page *nfs_try_to_update_request(struct inode *inode,
682 req->wb_bytes = rqend - req->wb_offset; 682 req->wb_bytes = rqend - req->wb_offset;
683out_unlock: 683out_unlock:
684 spin_unlock(&inode->i_lock); 684 spin_unlock(&inode->i_lock);
685 nfs_clear_request_commit(req); 685 if (req)
686 nfs_clear_request_commit(req);
686 return req; 687 return req;
687out_flushme: 688out_flushme:
688 spin_unlock(&inode->i_lock); 689 spin_unlock(&inode->i_lock);
@@ -1018,7 +1019,7 @@ out_bad:
1018 while (!list_empty(res)) { 1019 while (!list_empty(res)) {
1019 data = list_entry(res->next, struct nfs_write_data, list); 1020 data = list_entry(res->next, struct nfs_write_data, list);
1020 list_del(&data->list); 1021 list_del(&data->list);
1021 nfs_writedata_free(data); 1022 nfs_writedata_release(data);
1022 } 1023 }
1023 nfs_redirty_request(req); 1024 nfs_redirty_request(req);
1024 return -ENOMEM; 1025 return -ENOMEM;