Btrfs: check the return value of btrfs_start_delalloc_inodes()
[deliverable/linux.git] / fs / btrfs / dev-replace.c
index 66dbc8dbddf7584a7c4034203c896cf37fcecb39..7ba7b3900cb8eb749b82241cc4533b4fc978ef8a 100644 (file)
@@ -465,7 +465,11 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
         * flush all outstanding I/O and inode extent mappings before the
         * copy operation is declared as being finished
         */
-       btrfs_start_delalloc_inodes(root, 0);
+       ret = btrfs_start_delalloc_inodes(root, 0);
+       if (ret) {
+               mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
+               return ret;
+       }
        btrfs_wait_ordered_extents(root, 0);
 
        trans = btrfs_start_transaction(root, 0);
This page took 0.028506 seconds and 5 git commands to generate.