Rev 4104 | Rev 5060 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4104 | Rev 4246 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | struct page *shmem_read_mapping_page_gfp(struct file *filep, |
39 | struct page *shmem_read_mapping_page_gfp(struct file *filep, |
40 | pgoff_t index, gfp_t gfp) |
40 | pgoff_t index, gfp_t gfp) |
41 | { |
41 | { |
42 | struct page *page; |
42 | struct page *page; |
Line 43... | Line -... | ||
43 | - | ||
44 | // dbgprintf("%s, file %p index %d\n", __FUNCTION__, filep, index); |
- | |
45 | 43 | ||
46 | if(unlikely(index >= filep->count)) |
44 | if(unlikely(index >= filep->count)) |
Line 47... | Line 45... | ||
47 | return ERR_PTR(-EINVAL); |
45 | return ERR_PTR(-EINVAL); |
Line 54... | Line 52... | ||
54 | 52 | ||
55 | if(unlikely(page == NULL)) |
53 | if(unlikely(page == NULL)) |
Line 56... | Line 54... | ||
56 | return ERR_PTR(-ENOMEM); |
54 | return ERR_PTR(-ENOMEM); |
- | 55 | ||
- | 56 | filep->pages[index] = page; |
|
- | 57 | // printf("file %p index %d page %x\n", filep, index, page); |
|
57 | 58 | // delay(1); |
|
Line 58... | Line 59... | ||
58 | filep->pages[index] = page; |
59 | |
59 | }; |
60 | }; |