summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-06-21 22:31:47 +0200
committerTheodore Ts'o <tytso@mit.edu>2019-06-21 22:31:47 +0200
commitddce3b94715ca5a19a107cd7c1d89fea177d2454 (patch)
tree16f8f2eaf0e29fa678f1fbf12a70dd725173425b /fs/ext4/inline.c
parentext4: rename "dirent_csum" functions to use "dirblock" (diff)
downloadlinux-ddce3b94715ca5a19a107cd7c1d89fea177d2454.tar.xz
linux-ddce3b94715ca5a19a107cd7c1d89fea177d2454.zip
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>
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index f19dd5a08d0d..796137bb7dfa 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -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)