Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30424601 authored by David Sterba's avatar David Sterba
Browse files

btrfs: remove wait from struct btrfs_delalloc_work



The value is 0 and never changes, we can propagate the value, remove
wait and the implied dead code.

Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 651d494a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -3902,7 +3902,6 @@ void btrfs_extent_item_to_extent_map(struct inode *inode,
/* inode.c */
struct btrfs_delalloc_work {
	struct inode *inode;
	int wait;
	int delay_iput;
	struct completion completion;
	struct list_head list;
+3 −8
Original line number Diff line number Diff line
@@ -9440,14 +9440,10 @@ static void btrfs_run_delalloc_work(struct btrfs_work *work)
	delalloc_work = container_of(work, struct btrfs_delalloc_work,
				     work);
	inode = delalloc_work->inode;
	if (delalloc_work->wait) {
		btrfs_wait_ordered_range(inode, 0, (u64)-1);
	} else {
	filemap_flush(inode->i_mapping);
	if (test_bit(BTRFS_INODE_HAS_ASYNC_EXTENT,
				&BTRFS_I(inode)->runtime_flags))
		filemap_flush(inode->i_mapping);
	}

	if (delalloc_work->delay_iput)
		btrfs_add_delayed_iput(inode);
@@ -9468,7 +9464,6 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode,
	init_completion(&work->completion);
	INIT_LIST_HEAD(&work->list);
	work->inode = inode;
	work->wait = 0;
	work->delay_iput = delay_iput;
	WARN_ON_ONCE(!inode);
	btrfs_init_work(&work->work, btrfs_flush_delalloc_helper,