Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b99aa6cb authored by Chris Mason's avatar Chris Mason
Browse files

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

parent 69a32ac5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -795,6 +795,7 @@ 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);
	if (root->in_sysfs)
		btrfs_sysfs_del_root(root);
	if (root->inode)
		iput(root->inode);