diff mbox series

[8/8] btrfs: fold finish_compressed_bio_write into btrfs_finish_compressed_write_work

Message ID 20230210074841.628201-9-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/8] btrfs: embedded a btrfs_bio into struct compressed_bio | expand

Commit Message

Christoph Hellwig Feb. 10, 2023, 7:48 a.m. UTC
Fold finish_compressed_bio_write into its only caller as there is no
reason to keep them separate.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/btrfs/compression.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 0bbaccb1787080..0dff70cfd2371c 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -222,8 +222,11 @@  static noinline void end_compressed_writeback(const struct compressed_bio *cb)
 	/* the inode may be gone now */
 }
 
-static void finish_compressed_bio_write(struct compressed_bio *cb)
+static void btrfs_finish_compressed_write_work(struct work_struct *work)
 {
+	struct compressed_bio *cb =
+		container_of(work, struct compressed_bio, write_end_work);
+
 	/*
 	 * Ok, we're the last bio for this extent, step one is to call back
 	 * into the FS and do all the end_io operations.
@@ -240,14 +243,6 @@  static void finish_compressed_bio_write(struct compressed_bio *cb)
 	bio_put(&cb->bbio.bio);
 }
 
-static void btrfs_finish_compressed_write_work(struct work_struct *work)
-{
-	struct compressed_bio *cb =
-		container_of(work, struct compressed_bio, write_end_work);
-
-	finish_compressed_bio_write(cb);
-}
-
 /*
  * Do the cleanup once all the compressed pages hit the disk.  This will clear
  * writeback on the file pages and free the compressed pages.