summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-06-22 13:32:43 +0800
committerChris Mason <chris.mason@fusionio.com>2013-07-03 14:16:10 -0400
commit823a1568acfd12320cfd43c3e0552f924d40dd4b (patch)
tree304aae0da754d812c9b82204c9c7bedf9950f5ce /disk-io.c
parent785bfe3923f9dbc71e6e316d3c27afed5fbcf6d4 (diff)
Btrfs-progs: delete fs_devices itself from fs_uuid list before freeing
Otherwise we will access illegal addresses while searching on fs_uuid list. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/disk-io.c b/disk-io.c
index 9ffe6e4e..30e2370a 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -1280,6 +1280,7 @@ static int close_all_devices(struct btrfs_fs_info *fs_info)
kfree(device->label);
kfree(device);
}
+ list_del(&fs_info->fs_devices->list);
kfree(fs_info->fs_devices);
return 0;
}