NFS: ncommit count is being double decremented
authorFred Isaman <iisaman@netapp.com>
Tue, 20 Mar 2012 16:51:24 +0000 (12:51 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 20 Mar 2012 17:05:08 +0000 (13:05 -0400)
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>
fs/nfs/write.c

index 0de19f4..628d9a6 100644 (file)
@@ -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;