ext4: refactor initialize_dirent_tail()
Move the calculation of the location of the dirent tail into initialize_dirent_tail(). Also prefix the function with ext4_ to fix kernel namepsace polution. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -1132,7 +1132,6 @@ static int ext4_finish_convert_inline_dir(handle_t *handle,
|
||||
{
|
||||
int err, csum_size = 0, header_size = 0;
|
||||
struct ext4_dir_entry_2 *de;
|
||||
struct ext4_dir_entry_tail *t;
|
||||
void *target = dir_block->b_data;
|
||||
|
||||
/*
|
||||
@@ -1158,11 +1157,9 @@ static int ext4_finish_convert_inline_dir(handle_t *handle,
|
||||
inline_size - EXT4_INLINE_DOTDOT_SIZE + header_size,
|
||||
inode->i_sb->s_blocksize - csum_size);
|
||||
|
||||
if (csum_size) {
|
||||
t = EXT4_DIRENT_TAIL(dir_block->b_data,
|
||||
inode->i_sb->s_blocksize);
|
||||
initialize_dirent_tail(t, inode->i_sb->s_blocksize);
|
||||
}
|
||||
if (csum_size)
|
||||
ext4_initialize_dirent_tail(dir_block,
|
||||
inode->i_sb->s_blocksize);
|
||||
set_buffer_uptodate(dir_block);
|
||||
err = ext4_handle_dirty_dirblock(handle, inode, dir_block);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user