diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-04-23 10:54:16 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:07:29 +0200 |
commit | 076da91cd9ec4032f88bb30a162d576e9e46c2d6 (patch) | |
tree | 7927643a395bfff6768894bc997b6a5c1fa844f0 | |
parent | 4fbb514785154ac2eff2a85d60fc0974207171b2 (diff) |
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>
-rw-r--r-- | fs/btrfs/ctree.h | 4 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 11 |
2 files changed, 4 insertions, 11 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0dbb5a19d977..6cdc6d0e8525 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3169,14 +3169,12 @@ void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode, /* inode.c */ struct btrfs_delalloc_work { struct inode *inode; - int delay_iput; struct completion completion; struct list_head list; struct btrfs_work work; }; -struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, - int delay_iput); +struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode); struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode, struct page *page, size_t pg_offset, u64 start, diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 20a385b0668f..4e10bb1f300e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -10159,15 +10159,11 @@ static void btrfs_run_delalloc_work(struct btrfs_work *work) &BTRFS_I(inode)->runtime_flags)) filemap_flush(inode->i_mapping); - if (delalloc_work->delay_iput) - btrfs_add_delayed_iput(inode); - else - iput(inode); + iput(inode); complete(&delalloc_work->completion); } -struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, - int delay_iput) +struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode) { 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_LIST_HEAD(&work->list); work->inode = inode; - work->delay_iput = delay_iput; WARN_ON_ONCE(!inode); btrfs_init_work(&work->work, btrfs_flush_delalloc_helper, 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); - work = btrfs_alloc_delalloc_work(inode, 0); + work = btrfs_alloc_delalloc_work(inode); if (!work) { iput(inode); ret = -ENOMEM; |