diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4.h | 2 | ||||
-rw-r--r-- | fs/ext4/inode.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index a004699e7296..d0f15ef56de1 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1090,7 +1090,7 @@ extern int ext4_meta_trans_blocks(struct inode *, int nrblocks, int idxblocks); | |||
1090 | extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); | 1090 | extern int ext4_chunk_trans_blocks(struct inode *, int nrblocks); |
1091 | extern int ext4_block_truncate_page(handle_t *handle, | 1091 | extern int ext4_block_truncate_page(handle_t *handle, |
1092 | struct address_space *mapping, loff_t from); | 1092 | struct address_space *mapping, loff_t from); |
1093 | extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page); | 1093 | extern int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf); |
1094 | extern qsize_t ext4_get_reserved_space(struct inode *inode); | 1094 | extern qsize_t ext4_get_reserved_space(struct inode *inode); |
1095 | 1095 | ||
1096 | /* ioctl.c */ | 1096 | /* ioctl.c */ |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index b3fd65d46506..a2e7952bc5f9 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -5248,8 +5248,9 @@ static int ext4_bh_unmapped(handle_t *handle, struct buffer_head *bh) | |||
5248 | return !buffer_mapped(bh); | 5248 | return !buffer_mapped(bh); |
5249 | } | 5249 | } |
5250 | 5250 | ||
5251 | int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page) | 5251 | int ext4_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) |
5252 | { | 5252 | { |
5253 | struct page *page = vmf->page; | ||
5253 | loff_t size; | 5254 | loff_t size; |
5254 | unsigned long len; | 5255 | unsigned long len; |
5255 | int ret = -EINVAL; | 5256 | int ret = -EINVAL; |
@@ -5301,6 +5302,8 @@ int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page) | |||
5301 | goto out_unlock; | 5302 | goto out_unlock; |
5302 | ret = 0; | 5303 | ret = 0; |
5303 | out_unlock: | 5304 | out_unlock: |
5305 | if (ret) | ||
5306 | ret = VM_FAULT_SIGBUS; | ||
5304 | up_read(&inode->i_alloc_sem); | 5307 | up_read(&inode->i_alloc_sem); |
5305 | return ret; | 5308 | return ret; |
5306 | } | 5309 | } |