aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorVincent Stehlé <vincent.stehle@intel.com>2016-05-10 08:56:20 -0400
committerDavid Sterba <dsterba@suse.com>2016-05-10 10:22:26 -0400
commit72928f2476d08c79f132b4f44a17c9a011dd98e3 (patch)
tree64c7fd30eb9aebbb75394b2bde36712f4b66facf /fs/btrfs/backref.c
parent523567168da04bae0f88802ddef49d00072c5d58 (diff)
Btrfs: fix fspath error deallocation
Make sure to deallocate fspath with vfree() in case of error in init_ipath(). fspath is allocated with vmalloc() in init_data_container() since commit 425d17a290c0 ("Btrfs: use larger limit for translation of logical to inode"). Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 80e8472d618b..d3090187fd76 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1991,7 +1991,7 @@ struct inode_fs_paths *init_ipath(s32 total_bytes, struct btrfs_root *fs_root,
1991 1991
1992 ifp = kmalloc(sizeof(*ifp), GFP_NOFS); 1992 ifp = kmalloc(sizeof(*ifp), GFP_NOFS);
1993 if (!ifp) { 1993 if (!ifp) {
1994 kfree(fspath); 1994 vfree(fspath);
1995 return ERR_PTR(-ENOMEM); 1995 return ERR_PTR(-ENOMEM);
1996 } 1996 }
1997 1997