aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-06-09 00:17:05 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-06-09 00:17:05 -0400
commit03f5d8bcf094a5e3b501bd2ae1553656efa8d1be (patch)
tree04644e9008e7357fd87f14fee6404b7c306bc3e9 /fs/ext4/extents.c
parent0b8e58a140cae2ba1c4a21ccae7c6c3c939c51f9 (diff)
ext4: Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle()
Get rid of EXTEND_DISKSIZE flag of ext4_get_blocks_handle(). This seems to be a relict from some old days and setting disksize in this function does not make much sense. Currently it was set only by ext4_getblk(). Since the parameter has some effect only if create == 1, it is easy to check by grepping through the sources that the three callers which end up calling ext4_getblk() with create == 1 (ext4_append, ext4_quota_write, ext4_mkdir) do the right thing and set disksize themselves. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index d4e99e96fddb..9c35a7b1f0ae 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2779,7 +2779,6 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
2779 int err = 0, depth, ret, cache_type; 2779 int err = 0, depth, ret, cache_type;
2780 unsigned int allocated = 0; 2780 unsigned int allocated = 0;
2781 struct ext4_allocation_request ar; 2781 struct ext4_allocation_request ar;
2782 loff_t disksize;
2783 2782
2784 __clear_bit(BH_New, &bh_result->b_state); 2783 __clear_bit(BH_New, &bh_result->b_state);
2785 ext_debug("blocks %u/%u requested for inode %u\n", 2784 ext_debug("blocks %u/%u requested for inode %u\n",
@@ -2969,14 +2968,6 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
2969 newblock = ext_pblock(&newex); 2968 newblock = ext_pblock(&newex);
2970 allocated = ext4_ext_get_actual_len(&newex); 2969 allocated = ext4_ext_get_actual_len(&newex);
2971outnew: 2970outnew:
2972 if (flags & EXT4_GET_BLOCKS_EXTEND_DISKSIZE) {
2973 disksize = ((loff_t) iblock + ar.len) << inode->i_blkbits;
2974 if (disksize > i_size_read(inode))
2975 disksize = i_size_read(inode);
2976 if (disksize > EXT4_I(inode)->i_disksize)
2977 EXT4_I(inode)->i_disksize = disksize;
2978 }
2979
2980 set_buffer_new(bh_result); 2971 set_buffer_new(bh_result);
2981 2972
2982 /* Cache only when it is _not_ an uninitialized extent */ 2973 /* Cache only when it is _not_ an uninitialized extent */