Skip to contentSkip to conversation

NFS: ncommit count is being double decremented

PATCH New Fred Isaman 1 participant 1 message Mar 20, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 NFS: ncommit count is being double decremented

The decrement is handled by each call to nfs_request_remove_commit_list, no need to do it again in nfs_scan_commit.

---
 fs/nfs/write.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
fs/nfs/write.c +1 -4
index 0de19f4..628d9a6 100644
@@ -595,12 +595,9 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst)
 	spin_lock(&inode->i_lock);
 	if (nfsi->ncommit > 0) {
 		const int max = INT_MAX;
-		int pnfs_ret;
 
 		ret = nfs_scan_commit_list(&nfsi->commit_list, dst, max);
-		pnfs_ret = pnfs_scan_commit_lists(inode, max - ret);
-		ret += pnfs_ret;
-		nfsi->ncommit -= ret;
+		ret += pnfs_scan_commit_lists(inode, max - ret);
 	}
 	spin_unlock(&inode->i_lock);
 	return ret;
Signature · 1 line
1.7.2.1