aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@primarydata.com>2014-08-08 11:00:56 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-08-22 18:04:43 -0400
commit94970014c46223cbcdfbfc67b89596a412f9e3dd (patch)
tree1bb2e91e8cde9558d67f18a6d84e8eb7abb11545 /fs
parentbfd484a5606d6a0379a0a2f04251b1e5c1f8995c (diff)
nfs: fix error handling in lock_and_join_requests
This fixes handling of errors from nfs_page_group_lock in nfs_lock_and_join_requests. It now releases the inode lock and the reference to the head request. Reported-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Reviewed-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
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:
480 480
481 /* lock each request in the page group */ 481 /* lock each request in the page group */
482 ret = nfs_page_group_lock(head, true); 482 ret = nfs_page_group_lock(head, true);
483 if (ret < 0) 483 if (ret < 0) {
484 spin_unlock(&inode->i_lock);
485 nfs_release_request(head);
484 return ERR_PTR(ret); 486 return ERR_PTR(ret);
487 }
485 subreq = head; 488 subreq = head;
486 do { 489 do {
487 /* 490 /*