|
@@ -82,7 +82,6 @@ struct nfs_rw_header *nfs_writehdr_alloc(void)
|
|
INIT_LIST_HEAD(&hdr->rpc_list);
|
|
INIT_LIST_HEAD(&hdr->rpc_list);
|
|
spin_lock_init(&hdr->lock);
|
|
spin_lock_init(&hdr->lock);
|
|
atomic_set(&hdr->refcnt, 0);
|
|
atomic_set(&hdr->refcnt, 0);
|
|
- hdr->verf = &p->verf;
|
|
|
|
}
|
|
}
|
|
return p;
|
|
return p;
|
|
}
|
|
}
|
|
@@ -644,7 +643,7 @@ static void nfs_write_completion(struct nfs_pgio_header *hdr)
|
|
goto next;
|
|
goto next;
|
|
}
|
|
}
|
|
if (test_bit(NFS_IOHDR_NEED_COMMIT, &hdr->flags)) {
|
|
if (test_bit(NFS_IOHDR_NEED_COMMIT, &hdr->flags)) {
|
|
- memcpy(&req->wb_verf, &hdr->verf->verifier, sizeof(req->wb_verf));
|
|
|
|
|
|
+ memcpy(&req->wb_verf, &hdr->verf.verifier, sizeof(req->wb_verf));
|
|
nfs_mark_request_commit(req, hdr->lseg, &cinfo);
|
|
nfs_mark_request_commit(req, hdr->lseg, &cinfo);
|
|
goto next;
|
|
goto next;
|
|
}
|
|
}
|
|
@@ -1344,8 +1343,8 @@ static void nfs_writeback_release_common(void *calldata)
|
|
if (test_bit(NFS_IOHDR_NEED_RESCHED, &hdr->flags))
|
|
if (test_bit(NFS_IOHDR_NEED_RESCHED, &hdr->flags))
|
|
; /* Do nothing */
|
|
; /* Do nothing */
|
|
else if (!test_and_set_bit(NFS_IOHDR_NEED_COMMIT, &hdr->flags))
|
|
else if (!test_and_set_bit(NFS_IOHDR_NEED_COMMIT, &hdr->flags))
|
|
- memcpy(hdr->verf, &data->verf, sizeof(*hdr->verf));
|
|
|
|
- else if (memcmp(hdr->verf, &data->verf, sizeof(*hdr->verf)))
|
|
|
|
|
|
+ memcpy(&hdr->verf, &data->verf, sizeof(hdr->verf));
|
|
|
|
+ else if (memcmp(&hdr->verf, &data->verf, sizeof(hdr->verf)))
|
|
set_bit(NFS_IOHDR_NEED_RESCHED, &hdr->flags);
|
|
set_bit(NFS_IOHDR_NEED_RESCHED, &hdr->flags);
|
|
spin_unlock(&hdr->lock);
|
|
spin_unlock(&hdr->lock);
|
|
}
|
|
}
|