mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-20 18:29:07 +07:00
btrfs: Remove delayed_iput member from btrfs_delalloc_work
When allocating a delalloc work we are always setting the delayed_iput to 0. So remove the delay_iput member of btrfs_delalloc_work, as a result also remove it as a parameter from btrfs_alloc_delalloc_work since it's not used anymore. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
4fbb514785
commit
076da91cd9
@ -3169,14 +3169,12 @@ void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
|
|||||||
/* inode.c */
|
/* inode.c */
|
||||||
struct btrfs_delalloc_work {
|
struct btrfs_delalloc_work {
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
int delay_iput;
|
|
||||||
struct completion completion;
|
struct completion completion;
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct btrfs_work work;
|
struct btrfs_work work;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode,
|
struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode);
|
||||||
int delay_iput);
|
|
||||||
|
|
||||||
struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode,
|
struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode,
|
||||||
struct page *page, size_t pg_offset, u64 start,
|
struct page *page, size_t pg_offset, u64 start,
|
||||||
|
@ -10159,15 +10159,11 @@ static void btrfs_run_delalloc_work(struct btrfs_work *work)
|
|||||||
&BTRFS_I(inode)->runtime_flags))
|
&BTRFS_I(inode)->runtime_flags))
|
||||||
filemap_flush(inode->i_mapping);
|
filemap_flush(inode->i_mapping);
|
||||||
|
|
||||||
if (delalloc_work->delay_iput)
|
iput(inode);
|
||||||
btrfs_add_delayed_iput(inode);
|
|
||||||
else
|
|
||||||
iput(inode);
|
|
||||||
complete(&delalloc_work->completion);
|
complete(&delalloc_work->completion);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode,
|
struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode)
|
||||||
int delay_iput)
|
|
||||||
{
|
{
|
||||||
struct btrfs_delalloc_work *work;
|
struct btrfs_delalloc_work *work;
|
||||||
|
|
||||||
@ -10178,7 +10174,6 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode,
|
|||||||
init_completion(&work->completion);
|
init_completion(&work->completion);
|
||||||
INIT_LIST_HEAD(&work->list);
|
INIT_LIST_HEAD(&work->list);
|
||||||
work->inode = inode;
|
work->inode = inode;
|
||||||
work->delay_iput = delay_iput;
|
|
||||||
WARN_ON_ONCE(!inode);
|
WARN_ON_ONCE(!inode);
|
||||||
btrfs_init_work(&work->work, btrfs_flush_delalloc_helper,
|
btrfs_init_work(&work->work, btrfs_flush_delalloc_helper,
|
||||||
btrfs_run_delalloc_work, NULL, NULL);
|
btrfs_run_delalloc_work, NULL, NULL);
|
||||||
@ -10218,7 +10213,7 @@ static int start_delalloc_inodes(struct btrfs_root *root, int nr)
|
|||||||
}
|
}
|
||||||
spin_unlock(&root->delalloc_lock);
|
spin_unlock(&root->delalloc_lock);
|
||||||
|
|
||||||
work = btrfs_alloc_delalloc_work(inode, 0);
|
work = btrfs_alloc_delalloc_work(inode);
|
||||||
if (!work) {
|
if (!work) {
|
||||||
iput(inode);
|
iput(inode);
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
Loading…
Reference in New Issue
Block a user