diff options
Diffstat (limited to 'include/linux')
| -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, |
