.. | .. |
---|
4694 | 4694 | FALLOC_FL_INSERT_RANGE)) |
---|
4695 | 4695 | return -EOPNOTSUPP; |
---|
4696 | 4696 | |
---|
4697 | | - ext4_fc_start_update(inode); |
---|
4698 | 4697 | inode_lock(inode); |
---|
4699 | 4698 | ret = ext4_convert_inline_data(inode); |
---|
4700 | 4699 | inode_unlock(inode); |
---|
.. | .. |
---|
4764 | 4763 | inode_unlock(inode); |
---|
4765 | 4764 | trace_ext4_fallocate_exit(inode, offset, max_blocks, ret); |
---|
4766 | 4765 | exit: |
---|
4767 | | - ext4_fc_stop_update(inode); |
---|
4768 | 4766 | return ret; |
---|
4769 | 4767 | } |
---|
4770 | 4768 | |
---|
.. | .. |
---|
5802 | 5800 | struct ext4_extent *extent; |
---|
5803 | 5801 | ext4_lblk_t first_lblk, first_lclu, last_lclu; |
---|
5804 | 5802 | |
---|
| 5803 | + /* |
---|
| 5804 | + * if data can be stored inline, the logical cluster isn't |
---|
| 5805 | + * mapped - no physical clusters have been allocated, and the |
---|
| 5806 | + * file has no extents |
---|
| 5807 | + */ |
---|
| 5808 | + if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA) || |
---|
| 5809 | + ext4_has_inline_data(inode)) |
---|
| 5810 | + return 0; |
---|
| 5811 | + |
---|
5805 | 5812 | /* search for the extent closest to the first block in the cluster */ |
---|
5806 | 5813 | path = ext4_find_extent(inode, EXT4_C2B(sbi, lclu), NULL, 0); |
---|
5807 | 5814 | if (IS_ERR(path)) { |
---|