]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/btrfs/volumes.c
mtd: rawnand: marvell: add missing clk_disable_unprepare() on error in marvell_nfc_re...
[mirror_ubuntu-hirsute-kernel.git] / fs / btrfs / volumes.c
index d6c24c8ad7499b6e16a07d2d7332feee9baf573a..93f2b030fb9d4b0d5e630cf2eb5cc8f8ae157464 100644 (file)
@@ -7282,6 +7282,9 @@ static int btrfs_device_init_dev_stats(struct btrfs_device *device,
        int item_size;
        int i, ret, slot;
 
+       if (!device->fs_info->dev_root)
+               return 0;
+
        key.objectid = BTRFS_DEV_STATS_OBJECTID;
        key.type = BTRFS_PERSISTENT_ITEM_KEY;
        key.offset = device->devid;