/* Bump the transmission count */
req->wb_nio++;
if (!nfs_pageio_add_request(&desc, req)) {
- spin_lock(&cinfo.inode->i_lock);
+ spin_lock(&dreq->lock);
if (dreq->error < 0) {
desc.pg_error = dreq->error;
} else if (desc.pg_error != -EAGAIN) {
dreq->error = desc.pg_error;
} else
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
- spin_unlock(&cinfo.inode->i_lock);
+ spin_unlock(&dreq->lock);
break;
}
nfs_release_request(req);
/* If the error is soft, defer remaining requests */
nfs_init_cinfo_from_dreq(&cinfo, dreq);
- spin_lock(&cinfo.inode->i_lock);
+ spin_lock(&dreq->lock);
dreq->flags = NFS_ODIRECT_RESCHED_WRITES;
- spin_unlock(&cinfo.inode->i_lock);
+ spin_unlock(&dreq->lock);
nfs_unlock_request(req);
nfs_mark_request_commit(req, NULL, &cinfo, 0);
desc.pg_error = 0;