diff options
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 029b903a4ae3..0f5ebb72a5ea 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1819,6 +1819,13 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) | |||
1819 | "Failed to relocate sys chunks after " | 1819 | "Failed to relocate sys chunks after " |
1820 | "device initialization. This can be fixed " | 1820 | "device initialization. This can be fixed " |
1821 | "using the \"btrfs balance\" command."); | 1821 | "using the \"btrfs balance\" command."); |
1822 | trans = btrfs_attach_transaction(root); | ||
1823 | if (IS_ERR(trans)) { | ||
1824 | if (PTR_ERR(trans) == -ENOENT) | ||
1825 | return 0; | ||
1826 | return PTR_ERR(trans); | ||
1827 | } | ||
1828 | ret = btrfs_commit_transaction(trans, root); | ||
1822 | } | 1829 | } |
1823 | 1830 | ||
1824 | return ret; | 1831 | return ret; |