Skip to content

Commit

Permalink
NFS: Fix a refcounting issue in O_DIRECT
Browse files Browse the repository at this point in the history
In nfs_direct_write_reschedule(), the requests from nfs_scan_commit_list
have a refcount of 2, whereas the operations in
nfs_direct_write_completion_ops expect them to have a refcount of 1.

This patch adds a call to release the extra references.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 19, 2012
1 parent 0a9c63f commit 5a695da
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ static void nfs_direct_write_reschedule(struct nfs_direct_req *dreq)
dreq->error = -EIO;
spin_unlock(cinfo.lock);
}
nfs_release_request(req);
}
nfs_pageio_complete(&desc);

Expand Down

0 comments on commit 5a695da

Please sign in to comment.