VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Josef Bacik <josef@toxicpanda.com> 2021-03-11 11:23:16 -0500 committer: David Sterba <dsterba@suse.com> 2021-03-17 19:42:14 +0100 commit: 3cb894972f1809aa8d087c42e5e8b26c64b7d508 parent: 820a49dafc3304de06f296c35c9ff1ebc1666343
Commit Summary:
btrfs: do not initialize dev replace for bad dev root
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 3a9c1e046ebe..d05f73530af7 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -81,6 +81,9 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
 	struct btrfs_dev_replace_item *ptr;
 	u64 src_devid;
 
+	if (!dev_root)
+		return 0;
+
 	path = btrfs_alloc_path();
 	if (!path) {
 		ret = -ENOMEM;