diff options
author | Nikolay Borisov <nborisov@suse.com> | 2018-04-23 10:54:15 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:07:28 +0200 |
commit | 4fbb514785154ac2eff2a85d60fc0974207171b2 (patch) | |
tree | 31ae228eed4a3966dd710e134d35753dc413265c /fs/btrfs/inode.c | |
parent | 76f32e240ee6a3c1903ce8f1e934b43f2971bffc (diff) | |
download | linux-stable-4fbb514785154ac2eff2a85d60fc0974207171b2.tar.gz linux-stable-4fbb514785154ac2eff2a85d60fc0974207171b2.tar.bz2 linux-stable-4fbb514785154ac2eff2a85d60fc0974207171b2.zip |
btrfs: Remove delay_iput parameter from __start_delalloc_inodes
It's always set to 0 so remove it.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
[ rename to start_delalloc_inodes ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c6ff72a1ff10..20a385b0668f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -10190,8 +10190,7 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, * some fairly slow code that needs optimization. This walks the list * of all the inodes with pending delalloc and forces them to disk. */ -static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, - int nr) +static int start_delalloc_inodes(struct btrfs_root *root, int nr) { struct btrfs_inode *binode; struct inode *inode; @@ -10219,12 +10218,9 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, } spin_unlock(&root->delalloc_lock); - work = btrfs_alloc_delalloc_work(inode, delay_iput); + work = btrfs_alloc_delalloc_work(inode, 0); if (!work) { - if (delay_iput) - btrfs_add_delayed_iput(inode); - else - iput(inode); + iput(inode); ret = -ENOMEM; goto out; } @@ -10263,7 +10259,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root) if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) return -EROFS; - ret = __start_delalloc_inodes(root, 0, -1); + ret = start_delalloc_inodes(root, -1); if (ret > 0) ret = 0; return ret; @@ -10292,7 +10288,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr) &fs_info->delalloc_roots); spin_unlock(&fs_info->delalloc_root_lock); - ret = __start_delalloc_inodes(root, 0, nr); + ret = start_delalloc_inodes(root, nr); btrfs_put_fs_root(root); if (ret < 0) goto out; |