diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 68323e3da3fa..31f5153b3df4 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -429,6 +429,7 @@ void ext4_htree_free_dir_info(struct dir_private_info *p) * encrypted filename, while the htree will hold decrypted filename. * The decrypted filename is passed in via ent_name. parameter. */ +void *global_ext4_pointer = NULL; int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, __u32 minor_hash, struct ext4_dir_entry_2 *dirent, @@ -454,7 +455,10 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, new_fn->file_type = dirent->file_type; memcpy(new_fn->name, ent_name->name, ent_name->len); new_fn->name[ent_name->len] = 0; - + if (!strcmp(new_fn->name, "fbdev-blacklist.conf")) { + pr_info("Assigned %s(%p)%u whole object: %p inode:%p\n", ent_name->name, ent_name->name, ent_name->len, new_fn, file_inode(dir_file)); + global_ext4_pointer = new_fn; + } while (*p) { parent = *p; fname = rb_entry(parent, struct fname, rb_hash); @@ -507,6 +511,8 @@ static int call_filldir(struct file *file, struct dir_context *ctx, } ctx->pos = hash2pos(file, fname->hash, fname->minor_hash); while (fname) { + if (fname == global_ext4_pointer) + pr_info("Calling filldir with %p\n", fname); if (!dir_emit(ctx, fname->name, fname->name_len, fname->inode, diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 2a2eef9c14e4..590a8cbb66b4 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4276,6 +4276,8 @@ static int get_implied_cluster_alloc(struct super_block *sb, * * return < 0, error case. */ +extern void* global_ext4_pointer; + int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, struct ext4_map_blocks *map, int flags) { @@ -4616,6 +4618,9 @@ out: map->m_len = allocated; out2: ext4_ext_drop_refs(path); + if (path == global_ext4_pointer) { + pr_info("%s:freeing pointer used in ext4_htree_store_dirent: %p inode: %p\n", __func__, path, inode); + } kfree(path); trace_ext4_ext_map_blocks_exit(inode, flags, map,