diff options
author | Dan Carpenter <error27@gmail.com> | 2011-08-05 10:19:00 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-08-16 21:09:15 -0400 |
commit | f4ac904c411b55e58bb240f332f93db2455f0010 (patch) | |
tree | 410d865fa3f723e023970ece5637f4a21e6de0aa /fs | |
parent | c97c2916e25c56e878e3e94efd449e2d688fcb31 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 010aec8be824..0705d15542c6 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -150,6 +150,8 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, | |||
150 | spin_lock(&root->fs_info->defrag_inodes_lock); | 150 | spin_lock(&root->fs_info->defrag_inodes_lock); |
151 | if (!BTRFS_I(inode)->in_defrag) | 151 | if (!BTRFS_I(inode)->in_defrag) |
152 | __btrfs_add_inode_defrag(inode, defrag); | 152 | __btrfs_add_inode_defrag(inode, defrag); |
153 | else | ||
154 | kfree(defrag); | ||
153 | spin_unlock(&root->fs_info->defrag_inodes_lock); | 155 | spin_unlock(&root->fs_info->defrag_inodes_lock); |
154 | return 0; | 156 | return 0; |
155 | } | 157 | } |