summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 27715306f24b..e056f617adf2 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -480,8 +480,11 @@ try_again:
/* lock each request in the page group */
ret = nfs_page_group_lock(head, true);
- if (ret < 0)
+ if (ret < 0) {
+ spin_unlock(&inode->i_lock);
+ nfs_release_request(head);
return ERR_PTR(ret);
+ }
subreq = head;
do {
/*