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>
This commit is contained in:
Liu Bo 2013-06-22 13:32:43 +08:00 committed by Chris Mason
parent 785bfe3923
commit 823a1568ac

View File

@ -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;
}