--- a/read.c 2011-12-11 17:20:29.000000000 +0100
+++ b/read.c 2011-12-11 17:22:24.000000000 +0100
@@ -42,24 +42,10 @@
struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount)
{
+ start_injection_failslab();
struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, GFP_NOFS);
+ stop_injection_failslab();
-
- if (p) {
- memset(p, 0, sizeof(*p));
- INIT_LIST_HEAD(&p->pages);
- p->npages = pagecount;
- p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE;
- if (pagecount <= ARRAY_SIZE(p->page_array))
- p->pagevec = p->page_array;
- else {
- p->pagevec = kcalloc(pagecount, sizeof(struct page *), GFP_NOFS);
- if (!p->pagevec) {
- mempool_free(p, nfs_rdata_mempool);
- p = NULL;
- }
- }
- }
return p;
}