aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/buffer_head.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/buffer_head.h')
-rw-r--r--include/linux/buffer_head.h16
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 *);
218int generic_cont_expand_simple(struct inode *inode, loff_t size); 218int generic_cont_expand_simple(struct inode *inode, loff_t size);
219int block_commit_write(struct page *page, unsigned from, unsigned to); 219int block_commit_write(struct page *page, unsigned from, unsigned to);
220int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
221 get_block_t get_block);
220int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, 222int 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 */
225static 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}
222sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); 238sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
223int block_truncate_page(struct address_space *, loff_t, get_block_t *); 239int block_truncate_page(struct address_space *, loff_t, get_block_t *);
224int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, 240int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned,