diff options
| author | Jens Axboe <jens.axboe@oracle.com> | 2007-06-14 07:10:48 -0400 |
|---|---|---|
| committer | Jens Axboe <jens.axboe@oracle.com> | 2007-07-10 02:04:15 -0400 |
| commit | cac36bb06efe4880234524e117e0e712b10b1f16 (patch) | |
| tree | 5220c6f2185cee1c6934cf8048975beac5bc94bb /include/linux | |
| parent | d96e6e71647846e0dab097efd9b8bf3a3a556dca (diff) | |
pipe: change the ->pin() operation to ->confirm()
The name 'pin' was badly chosen, it doesn't pin a pipe buffer
in the most commonly used sense in the kernel. So change the
name to 'confirm', after debating this issue with Hugh
Dickins a bit.
A good return from ->confirm() means that the buffer is really
there, and that the contents are good.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pipe_fs_i.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 4409167b9eb2..cc09fe89bf07 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
| @@ -35,20 +35,21 @@ struct pipe_inode_info { | |||
| 35 | /* | 35 | /* |
| 36 | * Note on the nesting of these functions: | 36 | * Note on the nesting of these functions: |
| 37 | * | 37 | * |
| 38 | * ->pin() | 38 | * ->confirm() |
| 39 | * ->steal() | 39 | * ->steal() |
| 40 | * ... | 40 | * ... |
| 41 | * ->map() | 41 | * ->map() |
| 42 | * ... | 42 | * ... |
| 43 | * ->unmap() | 43 | * ->unmap() |
| 44 | * | 44 | * |
| 45 | * That is, ->map() must be called on a pinned buffer, same goes for ->steal(). | 45 | * That is, ->map() must be called on a confirmed buffer, |
| 46 | * same goes for ->steal(). | ||
| 46 | */ | 47 | */ |
| 47 | struct pipe_buf_operations { | 48 | struct pipe_buf_operations { |
| 48 | int can_merge; | 49 | int can_merge; |
| 49 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); | 50 | void * (*map)(struct pipe_inode_info *, struct pipe_buffer *, int); |
| 50 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); | 51 | void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *, void *); |
| 51 | int (*pin)(struct pipe_inode_info *, struct pipe_buffer *); | 52 | int (*confirm)(struct pipe_inode_info *, struct pipe_buffer *); |
| 52 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); | 53 | void (*release)(struct pipe_inode_info *, struct pipe_buffer *); |
| 53 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); | 54 | int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); |
| 54 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); | 55 | void (*get)(struct pipe_inode_info *, struct pipe_buffer *); |
| @@ -69,7 +70,7 @@ void __free_pipe_info(struct pipe_inode_info *); | |||
| 69 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); | 70 | void *generic_pipe_buf_map(struct pipe_inode_info *, struct pipe_buffer *, int); |
| 70 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); | 71 | void generic_pipe_buf_unmap(struct pipe_inode_info *, struct pipe_buffer *, void *); |
| 71 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); | 72 | void generic_pipe_buf_get(struct pipe_inode_info *, struct pipe_buffer *); |
| 72 | int generic_pipe_buf_pin(struct pipe_inode_info *, struct pipe_buffer *); | 73 | int generic_pipe_buf_confirm(struct pipe_inode_info *, struct pipe_buffer *); |
| 73 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); | 74 | int generic_pipe_buf_steal(struct pipe_inode_info *, struct pipe_buffer *); |
| 74 | 75 | ||
| 75 | #endif | 76 | #endif |
