All of lore.kernel.org
 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 5/8] btrfs: sink gfp parameter to btrfs_bio_clone
Date: Fri,  2 Jun 2017 18:58:41 +0200	[thread overview]
Message-ID: <383a5b09762c5ff16c9a68521184009fa95a87fc.1496422340.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1496422340.git.dsterba@suse.com>

All callers pass GFP_NOFS.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent_io.c | 4 ++--
 fs/btrfs/extent_io.h | 2 +-
 fs/btrfs/inode.c     | 2 +-
 fs/btrfs/volumes.c   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index a10906915bc9..a8f135286fa5 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2675,13 +2675,13 @@ btrfs_bio_alloc(struct block_device *bdev, u64 first_sector, int nr_vecs,
 	return bio;
 }
 
-struct bio *btrfs_bio_clone(struct bio *bio, gfp_t gfp_mask)
+struct bio *btrfs_bio_clone(struct bio *bio)
 {
 	struct btrfs_io_bio *btrfs_bio;
 	struct bio *new;
 
 	/* Bio allocation backed by a bioset does not fail */
-	new = bio_clone_fast(bio, gfp_mask, btrfs_bioset);
+	new = bio_clone_fast(bio, GFP_NOFS, btrfs_bioset);
 	btrfs_bio = btrfs_io_bio(new);
 	btrfs_bio->csum = NULL;
 	btrfs_bio->csum_allocated = NULL;
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index e3512c5d8770..4fe643a5aeaf 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -466,7 +466,7 @@ struct bio *
 btrfs_bio_alloc(struct block_device *bdev, u64 first_sector, int nr_vecs,
 		gfp_t gfp_flags);
 struct bio *btrfs_io_bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs);
-struct bio *btrfs_bio_clone(struct bio *bio, gfp_t gfp_mask);
+struct bio *btrfs_bio_clone(struct bio *bio);
 struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size);
 
 struct btrfs_fs_info;
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c8ed81edd40e..5112f2c45600 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8583,7 +8583,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,
 
 	skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM;
 
-	bio = btrfs_bio_clone(dio_bio, GFP_NOFS);
+	bio = btrfs_bio_clone(dio_bio);
 
 	dip = kzalloc(sizeof(*dip), GFP_NOFS);
 	if (!dip) {
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 864b203cc4aa..70bcebef7aa6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6256,7 +6256,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
 		}
 
 		if (dev_nr < total_devs - 1) {
-			bio = btrfs_bio_clone(first_bio, GFP_NOFS);
+			bio = btrfs_bio_clone(first_bio);
 		} else
 			bio = first_bio;
 
-- 
2.12.0


  parent reply	other threads:[~2017-06-02 16:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 16:58 [PATCH 0/8] Bio allocation and error handling cleanups David Sterba
2017-06-02 16:58 ` [PATCH 1/8] btrfs: bioset allocations will never fail, adapt our helpers David Sterba
2017-06-03  5:10   ` Christoph Hellwig
2017-06-06 10:21   ` Anand Jain
2017-06-06 10:44     ` Christoph Hellwig
2017-06-07  6:52       ` Anand Jain
2017-06-06 10:51     ` David Sterba
2017-06-07  9:10   ` Anand Jain
2017-06-02 16:58 ` [PATCH 2/8] btrfs: btrfs_bio_alloc never fails, skip error handling David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-02 16:58 ` [PATCH 3/8] btrfs: btrfs_bio_clone " David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-07 18:19   ` Omar Sandoval
2017-06-12 13:13     ` David Sterba
2017-06-02 16:58 ` [PATCH 4/8] btrfs: btrfs_io_bio_alloc " David Sterba
2017-06-07  9:11   ` Anand Jain
2017-06-02 16:58 ` David Sterba [this message]
2017-06-07  9:12   ` [PATCH 5/8] btrfs: sink gfp parameter to btrfs_bio_clone Anand Jain
2017-06-02 16:58 ` [PATCH 6/8] btrfs: remove redundant parameters from btrfs_bio_alloc David Sterba
2017-06-07  7:40   ` Anand Jain
2017-06-12 13:09     ` David Sterba
2017-06-02 16:58 ` [PATCH 7/8] btrfs: opencode trivial compressed_bio_alloc, simplify error handling David Sterba
2017-06-07  9:21   ` Anand Jain
2017-06-02 16:58 ` [PATCH 8/8] btrfs: pass bytes to btrfs_bio_alloc David Sterba
2017-06-07  9:22   ` Anand Jain

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=383a5b09762c5ff16c9a68521184009fa95a87fc.1496422340.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.