Skip to content

Commit

Permalink
NFS: ncommit count is being double decremented
Browse files Browse the repository at this point in the history
The decrement is handled by each call to nfs_request_remove_commit_list,
no need to do it again in nfs_scan_commit.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Fred Isaman authored and Trond Myklebust committed Mar 20, 2012
1 parent 540a0f7 commit c4f1b62
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c4f1b62

Please sign in to comment.