1
0
Fork 0

Btrfs: Only delete roots from sysfs when they were added to sysfs

Signed-off-by: Chris Mason <chris.mason@oracle.com>
hifive-unleashed-5.1
Chris Mason 2008-01-14 14:41:16 -05:00
parent 69a32ac517
commit b99aa6cb54
1 changed files with 2 additions and 1 deletions

View File

@ -795,7 +795,8 @@ int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root)
{
radix_tree_delete(&fs_info->fs_roots_radix,
(unsigned long)root->root_key.objectid);
btrfs_sysfs_del_root(root);
if (root->in_sysfs)
btrfs_sysfs_del_root(root);
if (root->inode)
iput(root->inode);
if (root->node)