diff options
author | Anand Jain <Anand.Jain@oracle.com> | 2014-08-13 14:24:23 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 13:38:09 -0700 |
commit | 8bef8401a04ae1937f3330484c2d7a8c6b9b9897 (patch) | |
tree | a03891299bf44f1d83802b3aa3914b652581de4f /fs/btrfs | |
parent | 94d5f0c2ae83c367fe870b49ed0c87025be2956e (diff) | |
download | linux-8bef8401a04ae1937f3330484c2d7a8c6b9b9897.tar.gz linux-8bef8401a04ae1937f3330484c2d7a8c6b9b9897.tar.bz2 linux-8bef8401a04ae1937f3330484c2d7a8c6b9b9897.zip |
btrfs: fix memory leak when there is no more seed device
When we replace all the seed device in the system there is
no point in just keeping the btrfs_fs_devices with out
any device
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 27a14f1c5a7c..94a0d186de4c 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1868,6 +1868,8 @@ void btrfs_rm_dev_replace_srcdev(struct btrfs_fs_info *fs_info, tmp_fs_devices = tmp_fs_devices->seed; } fs_devices->seed = NULL; + __btrfs_close_devices(fs_devices); + free_fs_devices(fs_devices); } } |