Btrfs: handle errors in btrfs_orphan_cleanup
If we cannot truncate an inode for some reason we will never delete the orphan item associated with that inode, which means that we will loop forever in btrfs_orphan_cleanup. Instead of doing this just return error so we fail to mount. It sucks, but hey it's better than hanging. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
This commit is contained in:
@@ -7619,7 +7619,8 @@ int btrfs_cleanup_reloc_trees(struct btrfs_root *root)
|
||||
|
||||
reloc_root = btrfs_read_fs_root_no_name(root->fs_info, &location);
|
||||
BUG_ON(!reloc_root);
|
||||
btrfs_orphan_cleanup(reloc_root);
|
||||
ret = btrfs_orphan_cleanup(reloc_root);
|
||||
BUG_ON(ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user