Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e22b3d1f authored by David Sterba's avatar David Sterba
Browse files

Merge branch 'dev/gfp-flags' into for-chris-4.6

parents 5f1b5664 66722f7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5361,7 +5361,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
		goto out;
	}

	tmp_buf = kmalloc(left_root->nodesize, GFP_NOFS);
	tmp_buf = kmalloc(left_root->nodesize, GFP_KERNEL);
	if (!tmp_buf) {
		ret = -ENOMEM;
		goto out;
+1 −1
Original line number Diff line number Diff line
@@ -802,7 +802,7 @@ static int btrfs_dev_replace_kthread(void *data)
	struct btrfs_ioctl_dev_replace_args *status_args;
	u64 progress;

	status_args = kzalloc(sizeof(*status_args), GFP_NOFS);
	status_args = kzalloc(sizeof(*status_args), GFP_KERNEL);
	if (status_args) {
		btrfs_dev_replace_status(fs_info, status_args);
		progress = status_args->status.progress_1000;
+11 −10
Original line number Diff line number Diff line
@@ -1296,9 +1296,10 @@ static void __setup_root(u32 nodesize, u32 sectorsize, u32 stripesize,
	spin_lock_init(&root->root_item_lock);
}

static struct btrfs_root *btrfs_alloc_root(struct btrfs_fs_info *fs_info)
static struct btrfs_root *btrfs_alloc_root(struct btrfs_fs_info *fs_info,
		gfp_t flags)
{
	struct btrfs_root *root = kzalloc(sizeof(*root), GFP_NOFS);
	struct btrfs_root *root = kzalloc(sizeof(*root), flags);
	if (root)
		root->fs_info = fs_info;
	return root;
@@ -1310,7 +1311,7 @@ struct btrfs_root *btrfs_alloc_dummy_root(void)
{
	struct btrfs_root *root;

	root = btrfs_alloc_root(NULL);
	root = btrfs_alloc_root(NULL, GFP_KERNEL);
	if (!root)
		return ERR_PTR(-ENOMEM);
	__setup_root(4096, 4096, 4096, root, NULL, 1);
@@ -1332,7 +1333,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
	int ret = 0;
	uuid_le uuid;

	root = btrfs_alloc_root(fs_info);
	root = btrfs_alloc_root(fs_info, GFP_KERNEL);
	if (!root)
		return ERR_PTR(-ENOMEM);

@@ -1408,7 +1409,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
	struct btrfs_root *tree_root = fs_info->tree_root;
	struct extent_buffer *leaf;

	root = btrfs_alloc_root(fs_info);
	root = btrfs_alloc_root(fs_info, GFP_NOFS);
	if (!root)
		return ERR_PTR(-ENOMEM);

@@ -1506,7 +1507,7 @@ static struct btrfs_root *btrfs_read_tree_root(struct btrfs_root *tree_root,
	if (!path)
		return ERR_PTR(-ENOMEM);

	root = btrfs_alloc_root(fs_info);
	root = btrfs_alloc_root(fs_info, GFP_NOFS);
	if (!root) {
		ret = -ENOMEM;
		goto alloc_fail;
@@ -2385,7 +2386,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info,
		return -EIO;
	}

	log_tree_root = btrfs_alloc_root(fs_info);
	log_tree_root = btrfs_alloc_root(fs_info, GFP_KERNEL);
	if (!log_tree_root)
		return -ENOMEM;

@@ -2510,8 +2511,8 @@ int open_ctree(struct super_block *sb,
	int backup_index = 0;
	int max_active;

	tree_root = fs_info->tree_root = btrfs_alloc_root(fs_info);
	chunk_root = fs_info->chunk_root = btrfs_alloc_root(fs_info);
	tree_root = fs_info->tree_root = btrfs_alloc_root(fs_info, GFP_KERNEL);
	chunk_root = fs_info->chunk_root = btrfs_alloc_root(fs_info, GFP_KERNEL);
	if (!tree_root || !chunk_root) {
		err = -ENOMEM;
		goto fail;
@@ -2622,7 +2623,7 @@ int open_ctree(struct super_block *sb,
	INIT_LIST_HEAD(&fs_info->ordered_roots);
	spin_lock_init(&fs_info->ordered_root_lock);
	fs_info->delayed_root = kmalloc(sizeof(struct btrfs_delayed_root),
					GFP_NOFS);
					GFP_KERNEL);
	if (!fs_info->delayed_root) {
		err = -ENOMEM;
		goto fail_iput;
+3 −3
Original line number Diff line number Diff line
@@ -2636,7 +2636,7 @@ static int add_falloc_range(struct list_head *head, u64 start, u64 len)
		return 0;
	}
insert:
	range = kmalloc(sizeof(*range), GFP_NOFS);
	range = kmalloc(sizeof(*range), GFP_KERNEL);
	if (!range)
		return -ENOMEM;
	range->start = start;
@@ -2737,7 +2737,7 @@ static long btrfs_fallocate(struct file *file, int mode,
			btrfs_put_ordered_extent(ordered);
			unlock_extent_cached(&BTRFS_I(inode)->io_tree,
					     alloc_start, locked_end,
					     &cached_state, GFP_NOFS);
					     &cached_state, GFP_KERNEL);
			/*
			 * we can't wait on the range with the transaction
			 * running or with the extent lock held
@@ -2831,7 +2831,7 @@ static long btrfs_fallocate(struct file *file, int mode,
	}
out_unlock:
	unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end,
			     &cached_state, GFP_NOFS);
			     &cached_state, GFP_KERNEL);
out:
	/*
	 * As we waited the extent range, the data_rsv_map must be empty
+1 −1
Original line number Diff line number Diff line
@@ -5793,7 +5793,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx)
			if (name_len <= sizeof(tmp_name)) {
				name_ptr = tmp_name;
			} else {
				name_ptr = kmalloc(name_len, GFP_NOFS);
				name_ptr = kmalloc(name_len, GFP_KERNEL);
				if (!name_ptr) {
					ret = -ENOMEM;
					goto err;
Loading