diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-27 03:54:47 -0400 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-27 03:54:47 -0400 |
| commit | aa7eb8e78d8ecd6cd0475d86ea8385ff9cb47ece (patch) | |
| tree | 3f9e98fadd5124fb05e8f6f9b06aa23698d4f215 /include/linux/buffer_head.h | |
| parent | cca8edfd2ec2a34d9f50f593bc753bb11e1bc1f5 (diff) | |
| parent | 3c6b50141ef9f0a8844bf1357b80c0cdf518bf05 (diff) | |
Merge branch 'next' into for-linus
Diffstat (limited to 'include/linux/buffer_head.h')
| -rw-r--r-- | include/linux/buffer_head.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f5df23561b96..503c8a6b3079 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -217,8 +217,24 @@ int cont_write_begin(struct file *, struct address_space *, loff_t, | |||
| 217 | get_block_t *, loff_t *); | 217 | get_block_t *, loff_t *); |
| 218 | int generic_cont_expand_simple(struct inode *inode, loff_t size); | 218 | int generic_cont_expand_simple(struct inode *inode, loff_t size); |
| 219 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 219 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
| 220 | int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | ||
| 221 | get_block_t get_block); | ||
| 220 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | 222 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, |
| 221 | get_block_t get_block); | 223 | get_block_t get_block); |
| 224 | /* Convert errno to return value from ->page_mkwrite() call */ | ||
| 225 | static inline int block_page_mkwrite_return(int err) | ||
| 226 | { | ||
| 227 | if (err == 0) | ||
| 228 | return VM_FAULT_LOCKED; | ||
| 229 | if (err == -EFAULT) | ||
| 230 | return VM_FAULT_NOPAGE; | ||
| 231 | if (err == -ENOMEM) | ||
| 232 | return VM_FAULT_OOM; | ||
| 233 | if (err == -EAGAIN) | ||
| 234 | return VM_FAULT_RETRY; | ||
| 235 | /* -ENOSPC, -EDQUOT, -EIO ... */ | ||
| 236 | return VM_FAULT_SIGBUS; | ||
| 237 | } | ||
| 222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 238 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
| 223 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); | 239 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); |
| 224 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, | 240 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, |
