Commit f9327a70 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David Sterba
Browse files

btrfs: fold finish_compressed_bio_write into btrfs_finish_compressed_write_work



Fold finish_compressed_bio_write into its only caller as there is no
reason to keep them separate.

Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent a959a174
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -220,8 +220,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.
@@ -238,14 +241,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.