Btrfs: put ENOSPC debugging under a mount option
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / extent-tree.c
index a7aaa10c5302224e4e1f025a72e2d8a630aca218..d375fc04a06524b1d717454d99a4329c03a78798 100644 (file)
@@ -5377,7 +5377,7 @@ again:
                               num_bytes, data, 1);
                goto again;
        }
-       if (ret == -ENOSPC) {
+       if (ret == -ENOSPC && btrfs_test_opt(root, ENOSPC_DEBUG)) {
                struct btrfs_space_info *sinfo;
 
                sinfo = __find_space_info(root->fs_info, data);