]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/super.c
Merge branch 'ttm-fixes-3.13' of git://people.freedesktop.org/~thomash/linux into...
[karo-tx-linux.git] / fs / btrfs / super.c
index 02f552f11829148e8f681a05dd288bf7331f5bc2..2d8ac1bf0cf9b9d613215000758cbfa312b4962e 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/cleancache.h>
 #include <linux/ratelimit.h>
 #include <linux/btrfs.h>
-#include "compat.h"
 #include "delayed-inode.h"
 #include "ctree.h"
 #include "disk-io.h"
@@ -921,7 +920,7 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
                return 0;
        }
 
-       btrfs_wait_all_ordered_extents(fs_info);
+       btrfs_wait_ordered_roots(fs_info, -1);
 
        trans = btrfs_attach_transaction_barrier(root);
        if (IS_ERR(trans)) {
@@ -1471,7 +1470,7 @@ static int btrfs_calc_avail_data_space(struct btrfs_root *root, u64 *free_bytes)
        nr_devices = fs_info->fs_devices->open_devices;
        BUG_ON(!nr_devices);
 
-       devices_info = kmalloc(sizeof(*devices_info) * nr_devices,
+       devices_info = kmalloc_array(nr_devices, sizeof(*devices_info),
                               GFP_NOFS);
        if (!devices_info)
                return -ENOMEM;