mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
btrfs: memory leak in btrfs_add_inode_defrag()
We don't use the defrag struct on this path. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
c97c2916e2
commit
f4ac904c41
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,8 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
|
|||
spin_lock(&root->fs_info->defrag_inodes_lock);
|
||||
if (!BTRFS_I(inode)->in_defrag)
|
||||
__btrfs_add_inode_defrag(inode, defrag);
|
||||
else
|
||||
kfree(defrag);
|
||||
spin_unlock(&root->fs_info->defrag_inodes_lock);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue