diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-22 16:36:27 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-05-22 16:36:27 -0400 |
commit | 53b8ee346463946f88b3e1639d688c384df1166c (patch) | |
tree | 31b089f4c9198293902d6e3ba46ee53c92c34726 /fs/nfs/nfs4filelayout.c | |
parent | b3f87b98aa3dc22cc58f970140113b270015cddb (diff) |
NFSv4.1: Fix a bad reference count issue in the pNFS commit code
filelayout_scan_commit_lists needs to bump the reference count on
the struct nfs_page just like nfs_scan_commit_list().
Reported-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 474c6305afd9..33849d3bc885 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -1106,6 +1106,7 @@ transfer_commit_list(struct list_head *src, struct list_head *dst, | |||
1106 | list_for_each_entry_safe(req, tmp, src, wb_list) { | 1106 | list_for_each_entry_safe(req, tmp, src, wb_list) { |
1107 | if (!nfs_lock_request(req)) | 1107 | if (!nfs_lock_request(req)) |
1108 | continue; | 1108 | continue; |
1109 | kref_get(&req->wb_kref); | ||
1109 | if (cond_resched_lock(cinfo->lock)) | 1110 | if (cond_resched_lock(cinfo->lock)) |
1110 | list_safe_reset_next(req, tmp, wb_list); | 1111 | list_safe_reset_next(req, tmp, wb_list); |
1111 | nfs_request_remove_commit_list(req, cinfo); | 1112 | nfs_request_remove_commit_list(req, cinfo); |