diff options
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 263a46c488c7..e8a67b8ba90c 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -731,18 +731,18 @@ int ext4_get_block(struct inode *inode, sector_t iblock, | |||
731 | * `handle' can be NULL if create is zero | 731 | * `handle' can be NULL if create is zero |
732 | */ | 732 | */ |
733 | struct buffer_head *ext4_getblk(handle_t *handle, struct inode *inode, | 733 | struct buffer_head *ext4_getblk(handle_t *handle, struct inode *inode, |
734 | ext4_lblk_t block, int create) | 734 | ext4_lblk_t block, int map_flags) |
735 | { | 735 | { |
736 | struct ext4_map_blocks map; | 736 | struct ext4_map_blocks map; |
737 | struct buffer_head *bh; | 737 | struct buffer_head *bh; |
738 | int create = map_flags & EXT4_GET_BLOCKS_CREATE; | ||
738 | int err; | 739 | int err; |
739 | 740 | ||
740 | J_ASSERT(handle != NULL || create == 0); | 741 | J_ASSERT(handle != NULL || create == 0); |
741 | 742 | ||
742 | map.m_lblk = block; | 743 | map.m_lblk = block; |
743 | map.m_len = 1; | 744 | map.m_len = 1; |
744 | err = ext4_map_blocks(handle, inode, &map, | 745 | err = ext4_map_blocks(handle, inode, &map, map_flags); |
745 | create ? EXT4_GET_BLOCKS_CREATE : 0); | ||
746 | 746 | ||
747 | if (err == 0) | 747 | if (err == 0) |
748 | return create ? ERR_PTR(-ENOSPC) : NULL; | 748 | return create ? ERR_PTR(-ENOSPC) : NULL; |
@@ -788,11 +788,11 @@ errout: | |||
788 | } | 788 | } |
789 | 789 | ||
790 | struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode, | 790 | struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode, |
791 | ext4_lblk_t block, int create) | 791 | ext4_lblk_t block, int map_flags) |
792 | { | 792 | { |
793 | struct buffer_head *bh; | 793 | struct buffer_head *bh; |
794 | 794 | ||
795 | bh = ext4_getblk(handle, inode, block, create); | 795 | bh = ext4_getblk(handle, inode, block, map_flags); |
796 | if (IS_ERR(bh)) | 796 | if (IS_ERR(bh)) |
797 | return bh; | 797 | return bh; |
798 | if (!bh || buffer_uptodate(bh)) | 798 | if (!bh || buffer_uptodate(bh)) |