fs: rename and move block_page_mkwrite_return
block_page_mkwrite_return is neither block nor mkwrite specific, and should not be under CONFIG_BLOCK. Move it to mm.h and rename it to vmf_fs_error. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20230801172201.1923299-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
4a8b719f95
commit
2ba39cc46b
@@ -291,18 +291,6 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size);
|
||||
int block_commit_write(struct page *page, unsigned from, unsigned to);
|
||||
int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
|
||||
get_block_t get_block);
|
||||
/* Convert errno to return value from ->page_mkwrite() call */
|
||||
static inline vm_fault_t block_page_mkwrite_return(int err)
|
||||
{
|
||||
if (err == 0)
|
||||
return VM_FAULT_LOCKED;
|
||||
if (err == -EFAULT || err == -EAGAIN)
|
||||
return VM_FAULT_NOPAGE;
|
||||
if (err == -ENOMEM)
|
||||
return VM_FAULT_OOM;
|
||||
/* -ENOSPC, -EDQUOT, -EIO ... */
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
|
||||
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user