diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-01-14 14:41:16 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | b99aa6cb548ae9461c5dc0e38f88ebc618ea68d7 (patch) | |
tree | 3e7dd96f7abf582f2e8bea8e6aa7d906071ddff5 /fs/btrfs/disk-io.c | |
parent | 69a32ac5175ec9bcfb407e8619a024e5eaea87b7 (diff) |
Btrfs: Only delete roots from sysfs when they were added to sysfs
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0338f8fd382d..87daed632f37 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -795,7 +795,8 @@ int btrfs_free_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root) | |||
795 | { | 795 | { |
796 | radix_tree_delete(&fs_info->fs_roots_radix, | 796 | radix_tree_delete(&fs_info->fs_roots_radix, |
797 | (unsigned long)root->root_key.objectid); | 797 | (unsigned long)root->root_key.objectid); |
798 | btrfs_sysfs_del_root(root); | 798 | if (root->in_sysfs) |
799 | btrfs_sysfs_del_root(root); | ||
799 | if (root->inode) | 800 | if (root->inode) |
800 | iput(root->inode); | 801 | iput(root->inode); |
801 | if (root->node) | 802 | if (root->node) |