Skip to contentSkip to conversation

Unused code cleanups

PATCH In review David Sterba 2 participants 5 messages Aug 1, 2019 – Aug 2, 2019 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

cover Unused code cleanups

David Sterba (2):
btrfs: remove unused btrfs_device::flush_bio_sent
btrfs: remove unused key type set/get helpers

 fs/btrfs/ctree.h   | 10 ----------
 fs/btrfs/volumes.h |  1 -
 2 files changed, 11 deletions(-)
Signature · 1 line
2.22.0
author maintainer
#1 lore raw

PATCH 1/2 btrfs: remove unused btrfs_device::flush_bio_sent

The status of flush bio is tracked as a status bit, changed in commit 1c3063b6dbfa ("btrfs: cleanup device states define BTRFS_DEV_STATE_FLUSH_SENT"), the flush_bio_sent was forgotten.

---
 fs/btrfs/volumes.h | 1 -
 1 file changed, 1 deletion(-)
fs/btrfs/volumes.h +0 -1
index c71354fe1363..081cb734a239 100644
@@ -82,7 +82,6 @@ struct btrfs_device {
 
 	unsigned long dev_state;
 	blk_status_t last_flush_error;
-	int flush_bio_sent;
 
 #ifdef __BTRFS_NEED_DEVICE_DATA_ORDERED
 	seqcount_t data_seqcount;
Signature · 1 line
2.22.0
author maintainer
#3 lore raw

PATCH 2/2 btrfs: remove unused key type set/get helpers

In reply to David Sterba

The switch to open coded set/get has happend long time ago in 962a298f3511 ("btrfs: kill the key type accessor helpers"), remove the stray helpers.

---
 fs/btrfs/ctree.h | 10 ----------
 1 file changed, 10 deletions(-)
fs/btrfs/ctree.h +0 -10
index 1110bbd4bffb..3af3f680b5f1 100644
@@ -2072,16 +2072,6 @@ static inline void btrfs_dir_item_key_to_cpu(const struct extent_buffer *eb,
 	btrfs_disk_key_to_cpu(key, &disk_key);
 }
 
-static inline u8 btrfs_key_type(const struct btrfs_key *key)
-{
-	return key->type;
-}
-
-static inline void btrfs_set_key_type(struct btrfs_key *key, u8 val)
-{
-	key->type = val;
-}
-
 /* struct btrfs_header */
 BTRFS_SETGET_HEADER_FUNCS(header_bytenr, struct btrfs_header, bytenr, 64);
 BTRFS_SETGET_HEADER_FUNCS(header_generation, struct btrfs_header,
Signature · 1 line
2.22.0