page.c (da733563be5a9da26fe81d9f007262d00b846e22) | page.c (2c53040f018b6c36a46eec75b9b937aaa5f78e6d) |
---|---|
1/* 2 * Copyright (c) 2006 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 60 unchanged lines hidden (view full) --- 69 ret = copy_from_user(addr + offset, ptr, bytes); 70 } 71 kunmap(page); 72 73 return ret ? -EFAULT : 0; 74} 75EXPORT_SYMBOL_GPL(rds_page_copy_user); 76 | 1/* 2 * Copyright (c) 2006 Oracle. All rights reserved. 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: --- 60 unchanged lines hidden (view full) --- 69 ret = copy_from_user(addr + offset, ptr, bytes); 70 } 71 kunmap(page); 72 73 return ret ? -EFAULT : 0; 74} 75EXPORT_SYMBOL_GPL(rds_page_copy_user); 76 |
77/* 78 * Message allocation uses this to build up regions of a message. | 77/** 78 * rds_page_remainder_alloc - build up regions of a message. |
79 * | 79 * |
80 * @bytes - the number of bytes needed. 81 * @gfp - the waiting behaviour of the allocation | 80 * @scat: Scatter list for message 81 * @bytes: the number of bytes needed. 82 * @gfp: the waiting behaviour of the allocation |
82 * 83 * @gfp is always ored with __GFP_HIGHMEM. Callers must be prepared to 84 * kmap the pages, etc. 85 * 86 * If @bytes is at least a full page then this just returns a page from 87 * alloc_page(). 88 * 89 * If @bytes is a partial page then this stores the unused region of the --- 125 unchanged lines hidden --- | 83 * 84 * @gfp is always ored with __GFP_HIGHMEM. Callers must be prepared to 85 * kmap the pages, etc. 86 * 87 * If @bytes is at least a full page then this just returns a page from 88 * alloc_page(). 89 * 90 * If @bytes is a partial page then this stores the unused region of the --- 125 unchanged lines hidden --- |