Revert "ANDROID: Revert: Merge 5.4.60 into android11-5.4"

This reverts commit f553ed04bc and really
does merge v5.4.60 into the tree.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I164a49d7930e441b52c8a80b2fa5aa2b7ec41ed9
This commit is contained in:
Greg Kroah-Hartman
2020-08-23 12:45:23 +02:00
parent 395ea775bf
commit 2669cd8a3e
151 changed files with 1088 additions and 630 deletions

View File

@@ -1475,9 +1475,16 @@ int btrfs_init_fs_root(struct btrfs_root *root)
spin_lock_init(&root->ino_cache_lock);
init_waitqueue_head(&root->ino_cache_wait);
ret = get_anon_bdev(&root->anon_dev);
if (ret)
goto fail;
/*
* Don't assign anonymous block device to roots that are not exposed to
* userspace, the id pool is limited to 1M
*/
if (is_fstree(root->root_key.objectid) &&
btrfs_root_refs(&root->root_item) > 0) {
ret = get_anon_bdev(&root->anon_dev);
if (ret)
goto fail;
}
mutex_lock(&root->objectid_mutex);
ret = btrfs_find_highest_objectid(root,