| #include <linux/pagemap.h> |
| #include <linux/highmem.h> |
| int ceph_pagelist_release(struct ceph_pagelist *pl) |
| while (!list_empty(&pl->head)) { |
| struct page *page = list_first_entry(&pl->head, struct page, |
| static int ceph_pagelist_addpage(struct ceph_pagelist *pl) |
| struct page *page = alloc_page(GFP_NOFS); |
| list_add_tail(&page->lru, &pl->head); |
| pl->mapped_tail = kmap(page); |
| int ceph_pagelist_append(struct ceph_pagelist *pl, void *buf, size_t len) |
| memcpy(pl->mapped_tail + (pl->length & ~PAGE_CACHE_MASK), |
| ret = ceph_pagelist_addpage(pl); |
| memcpy(pl->mapped_tail + (pl->length & ~PAGE_CACHE_MASK), buf, len); |