mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-12 02:50:14 -05:00
Btrfs: Only delete roots from sysfs when they were added to sysfs
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user