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 6/9] btrfs: open code extent_set_compress_type helpers
Date: Fri, 29 Apr 2022 20:27:39 +0200	[thread overview]
Message-ID: <fafc7bad921737290f418866b119ea7e2c727edf.1651255990.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1651255990.git.dsterba@suse.com>

The helpers extent_set_compress_type and extent_compress_type have
become trivial after previous cleanups and can be removed.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/extent_io.c |  8 +++-----
 fs/btrfs/extent_io.h | 11 -----------
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index efea465d0e9b..3d5cc5769350 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2562,7 +2562,7 @@ static struct io_failure_record *btrfs_get_io_failure_record(struct inode *inode
 	logical = em->block_start + logical;
 	if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
 		logical = em->block_start;
-		extent_set_compress_type(&failrec->bio_flags, em->compress_type);
+		failrec->bio_flags = em->compress_type;
 	}
 
 	btrfs_debug(fs_info,
@@ -3681,10 +3681,8 @@ static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
 		BUG_ON(extent_map_end(em) <= cur);
 		BUG_ON(end < cur);
 
-		if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
-			extent_set_compress_type(&this_bio_flag,
-						 em->compress_type);
-		}
+		if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags))
+			this_bio_flag = em->compress_type;
 
 		iosize = min(extent_map_end(em) - cur, end - cur + 1);
 		cur_end = min(extent_map_end(em) - 1, end);
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index ba793cb7a3a2..fdbfe801dbe2 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -140,17 +140,6 @@ static inline void extent_changeset_free(struct extent_changeset *changeset)
 	kfree(changeset);
 }
 
-static inline void extent_set_compress_type(unsigned long *bio_flags,
-					    int compress_type)
-{
-	*bio_flags = compress_type;
-}
-
-static inline int extent_compress_type(unsigned long bio_flags)
-{
-	return bio_flags;
-}
-
 struct extent_map_tree;
 
 typedef struct extent_map *(get_extent_t)(struct btrfs_inode *inode,
-- 
2.34.1


  parent reply	other threads:[~2022-04-29 18:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 18:27 [PATCH 0/9] Structre and parameter cleanups David Sterba
2022-04-29 18:27 ` [PATCH 1/9] btrfs: sink parameter is_data to btrfs_set_disk_extent_flags David Sterba
2022-05-01 20:24   ` Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 2/9] btrfs: remove btrfs_delayed_extent_op::is_data David Sterba
2022-05-01 20:24   ` Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 3/9] btrfs: remove unused parameter bio_flags from btrfs_wq_submit_bio David Sterba
2022-05-01 20:25   ` Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 4/9] btrfs: remove trivial helper update_nr_written David Sterba
2022-05-01 20:25   ` Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 5/9] btrfs: simplify handling of bio_ctrl::bio_flags David Sterba
2022-05-01 20:26   ` Johannes Thumshirn
2022-04-29 18:27 ` David Sterba [this message]
2022-05-01 20:27   ` [PATCH 6/9] btrfs: open code extent_set_compress_type helpers Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 7/9] btrfs: rename io_failure_record::bio_flags to compress_type David Sterba
2022-05-01 20:22   ` Johannes Thumshirn
2022-05-02 15:16     ` David Sterba
2022-05-02 16:26       ` David Sterba
2022-05-02 16:31         ` Johannes Thumshirn
2022-04-29 18:27 ` [PATCH 8/9] btrfs: rename bio_flags in parameters and switch type David Sterba
2022-04-29 18:27 ` [PATCH 9/9] btrfs: rename bio_ctrl::bio_flags to compress_type David Sterba
2022-05-03  7:57 ` [PATCH 0/9] Structre and parameter cleanups Nikolay Borisov
2022-05-09 19:56   ` 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=fafc7bad921737290f418866b119ea7e2c727edf.1651255990.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.