diff options
Diffstat (limited to 'fs/ext3/inode.c')
| -rw-r--r-- | fs/ext3/inode.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 4d7da6f6184b..b49908a167ae 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c | |||
| @@ -788,7 +788,7 @@ err_out: | |||
| 788 | int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | 788 | int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, |
| 789 | sector_t iblock, unsigned long maxblocks, | 789 | sector_t iblock, unsigned long maxblocks, |
| 790 | struct buffer_head *bh_result, | 790 | struct buffer_head *bh_result, |
| 791 | int create, int extend_disksize) | 791 | int create) |
| 792 | { | 792 | { |
| 793 | int err = -EIO; | 793 | int err = -EIO; |
| 794 | int offsets[4]; | 794 | int offsets[4]; |
| @@ -911,13 +911,6 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | |||
| 911 | if (!err) | 911 | if (!err) |
| 912 | err = ext3_splice_branch(handle, inode, iblock, | 912 | err = ext3_splice_branch(handle, inode, iblock, |
| 913 | partial, indirect_blks, count); | 913 | partial, indirect_blks, count); |
| 914 | /* | ||
| 915 | * i_disksize growing is protected by truncate_mutex. Don't forget to | ||
| 916 | * protect it if you're about to implement concurrent | ||
| 917 | * ext3_get_block() -bzzz | ||
| 918 | */ | ||
| 919 | if (!err && extend_disksize && inode->i_size > ei->i_disksize) | ||
| 920 | ei->i_disksize = inode->i_size; | ||
| 921 | mutex_unlock(&ei->truncate_mutex); | 914 | mutex_unlock(&ei->truncate_mutex); |
| 922 | if (err) | 915 | if (err) |
| 923 | goto cleanup; | 916 | goto cleanup; |
| @@ -972,7 +965,7 @@ static int ext3_get_block(struct inode *inode, sector_t iblock, | |||
| 972 | } | 965 | } |
| 973 | 966 | ||
| 974 | ret = ext3_get_blocks_handle(handle, inode, iblock, | 967 | ret = ext3_get_blocks_handle(handle, inode, iblock, |
| 975 | max_blocks, bh_result, create, 0); | 968 | max_blocks, bh_result, create); |
| 976 | if (ret > 0) { | 969 | if (ret > 0) { |
| 977 | bh_result->b_size = (ret << inode->i_blkbits); | 970 | bh_result->b_size = (ret << inode->i_blkbits); |
| 978 | ret = 0; | 971 | ret = 0; |
| @@ -1005,7 +998,7 @@ struct buffer_head *ext3_getblk(handle_t *handle, struct inode *inode, | |||
| 1005 | dummy.b_blocknr = -1000; | 998 | dummy.b_blocknr = -1000; |
| 1006 | buffer_trace_init(&dummy.b_history); | 999 | buffer_trace_init(&dummy.b_history); |
| 1007 | err = ext3_get_blocks_handle(handle, inode, block, 1, | 1000 | err = ext3_get_blocks_handle(handle, inode, block, 1, |
| 1008 | &dummy, create, 1); | 1001 | &dummy, create); |
| 1009 | /* | 1002 | /* |
| 1010 | * ext3_get_blocks_handle() returns number of blocks | 1003 | * ext3_get_blocks_handle() returns number of blocks |
| 1011 | * mapped. 0 in case of a HOLE. | 1004 | * mapped. 0 in case of a HOLE. |
