Btrfs: hardcode GFP_NOFS for btrfs_bio_clone_partial
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 16 May 2017 17:57:14 +0000 (10:57 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:25:59 +0000 (18:25 +0200)
We only pass GFP_NOFS to btrfs_bio_clone_partial, so lets hardcode it.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/inode.c

index acb8c1d177e2b5080f98fedb7ba99acd809dbcab..f2312b8aec4d7e429c2f4b9fc6bc7e8e85a4ddf7 100644 (file)
@@ -2721,14 +2721,13 @@ struct bio *btrfs_io_bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs)
        return bio;
 }
 
-struct bio *btrfs_bio_clone_partial(struct bio *orig, gfp_t gfp_mask,
-                                   int offset, int size)
+struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size)
 {
        struct bio *bio;
        struct btrfs_io_bio *btrfs_bio;
 
        /* this will never fail when it's backed by a bioset */
-       bio = bio_clone_fast(orig, gfp_mask, btrfs_bioset);
+       bio = bio_clone_fast(orig, GFP_NOFS, btrfs_bioset);
        ASSERT(bio);
 
        btrfs_bio = btrfs_io_bio(bio);
index 3df018549ce44ee5a1e73ccba6d37576ef50f3f2..e3512c5d8770d82de60f92e8d0985cdd2a5b86b3 100644 (file)
@@ -467,8 +467,7 @@ 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_partial(struct bio *orig, gfp_t gfp_mask,
-                                   int offset, int size);
+struct bio *btrfs_bio_clone_partial(struct bio *orig, int offset, int size);
 
 struct btrfs_fs_info;
 struct btrfs_inode;
index 93f1b31199d245f0c481dbe3564bcdce31b9b8f5..97b2bb9d3c89246fffeec5c108db7b176b101a78 100644 (file)
@@ -8514,7 +8514,7 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip,
                 * This will never fail as it's passing GPF_NOFS and
                 * the allocation is backed by btrfs_bioset.
                 */
-               bio = btrfs_bio_clone_partial(orig_bio, GFP_NOFS, clone_offset,
+               bio = btrfs_bio_clone_partial(orig_bio, clone_offset,
                                              clone_len);
                bio->bi_private = dip;
                bio->bi_end_io = btrfs_end_dio_bio;