ioctl.c (df031f0752d50f2061df2847d57ea52a79f7977c) ioctl.c (425d17a290c0c63785ec65db154a95c6337aeefa)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 3216 unchanged lines hidden (view full) ---

3225 }
3226
3227 path = btrfs_alloc_path();
3228 if (!path) {
3229 ret = -ENOMEM;
3230 goto out;
3231 }
3232
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 3216 unchanged lines hidden (view full) ---

3225 }
3226
3227 path = btrfs_alloc_path();
3228 if (!path) {
3229 ret = -ENOMEM;
3230 goto out;
3231 }
3232
3233 size = min_t(u32, loi->size, 4096);
3233 size = min_t(u32, loi->size, 64 * 1024);
3234 inodes = init_data_container(size);
3235 if (IS_ERR(inodes)) {
3236 ret = PTR_ERR(inodes);
3237 inodes = NULL;
3238 goto out;
3239 }
3240
3241 ret = iterate_inodes_from_logical(loi->logical, root->fs_info, path,

--- 5 unchanged lines hidden (view full) ---

3247
3248 ret = copy_to_user((void *)(unsigned long)loi->inodes,
3249 (void *)(unsigned long)inodes, size);
3250 if (ret)
3251 ret = -EFAULT;
3252
3253out:
3254 btrfs_free_path(path);
3234 inodes = init_data_container(size);
3235 if (IS_ERR(inodes)) {
3236 ret = PTR_ERR(inodes);
3237 inodes = NULL;
3238 goto out;
3239 }
3240
3241 ret = iterate_inodes_from_logical(loi->logical, root->fs_info, path,

--- 5 unchanged lines hidden (view full) ---

3247
3248 ret = copy_to_user((void *)(unsigned long)loi->inodes,
3249 (void *)(unsigned long)inodes, size);
3250 if (ret)
3251 ret = -EFAULT;
3252
3253out:
3254 btrfs_free_path(path);
3255 kfree(inodes);
3255 vfree(inodes);
3256 kfree(loi);
3257
3258 return ret;
3259}
3260
3261void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
3262 struct btrfs_ioctl_balance_args *bargs)
3263{

--- 517 unchanged lines hidden ---
3256 kfree(loi);
3257
3258 return ret;
3259}
3260
3261void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
3262 struct btrfs_ioctl_balance_args *bargs)
3263{

--- 517 unchanged lines hidden ---