linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 8/9] btrfs: extent same: use GFP_KERNEL for page array allocations
Date: Thu, 11 Feb 2016 17:57:18 +0100	[thread overview]
Message-ID: <fd95ef56b1acf96a24ff3d3f7bf19c2350ad0786.1455208920.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1455208920.git.dsterba@suse.com>

We can safely use GFP_KERNEL in the functions called from the ioctl
handlers. Here we can allocate up to 32k so less pressure to the
allocator could help.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 952172ca7e45..55440a742594 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2925,8 +2925,8 @@ static int btrfs_cmp_data_prepare(struct inode *src, u64 loff,
 	 * of the array is bounded by len, which is in turn bounded by
 	 * BTRFS_MAX_DEDUPE_LEN.
 	 */
-	src_pgarr = kzalloc(num_pages * sizeof(struct page *), GFP_NOFS);
-	dst_pgarr = kzalloc(num_pages * sizeof(struct page *), GFP_NOFS);
+	src_pgarr = kzalloc(num_pages * sizeof(struct page *), GFP_KERNEL);
+	dst_pgarr = kzalloc(num_pages * sizeof(struct page *), GFP_KERNEL);
 	if (!src_pgarr || !dst_pgarr) {
 		kfree(src_pgarr);
 		kfree(dst_pgarr);
-- 
2.7.1


  parent reply	other threads:[~2016-02-11 16:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 16:56 [PULL][PATCH 0/9] GFP_NOFS flags cleanup, part 2 David Sterba
2016-02-11 16:56 ` [PATCH 1/9] btrfs: send: use GFP_KERNEL everywhere David Sterba
2016-02-11 16:56 ` [PATCH 2/9] btrfs: reada: " David Sterba
2016-02-11 16:57 ` [PATCH 3/9] btrfs: scrub: use GFP_KERNEL on the submission path David Sterba
2016-02-11 16:57 ` [PATCH 4/9] btrfs: let callers of btrfs_alloc_root pass gfp flags David Sterba
2016-02-11 16:57 ` [PATCH 5/9] btrfs: fallocate: use GFP_KERNEL David Sterba
2016-02-11 16:57 ` [PATCH 6/9] btrfs: readdir: " David Sterba
2016-02-11 16:57 ` [PATCH 7/9] btrfs: device add and remove: " David Sterba
2016-02-11 16:57 ` David Sterba [this message]
2016-02-11 16:57 ` [PATCH 9/9] btrfs: switch to kcalloc in btrfs_cmp_data_prepare David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fd95ef56b1acf96a24ff3d3f7bf19c2350ad0786.1455208920.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).