Commit 4fbb5147 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove delay_iput parameter from __start_delalloc_inodes

It's always set to 0 so remove it.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
[ rename to start_delalloc_inodes ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 76f32e24
...@@ -10190,8 +10190,7 @@ struct btrfs_delalloc_work *btrfs_alloc_delalloc_work(struct inode *inode, ...@@ -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 * some fairly slow code that needs optimization. This walks the list
* of all the inodes with pending delalloc and forces them to disk. * of all the inodes with pending delalloc and forces them to disk.
*/ */
static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, static int start_delalloc_inodes(struct btrfs_root *root, int nr)
int nr)
{ {
struct btrfs_inode *binode; struct btrfs_inode *binode;
struct inode *inode; struct inode *inode;
...@@ -10219,12 +10218,9 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput, ...@@ -10219,12 +10218,9 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput,
} }
spin_unlock(&root->delalloc_lock); spin_unlock(&root->delalloc_lock);
work = btrfs_alloc_delalloc_work(inode, delay_iput); work = btrfs_alloc_delalloc_work(inode, 0);
if (!work) { if (!work) {
if (delay_iput) iput(inode);
btrfs_add_delayed_iput(inode);
else
iput(inode);
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
...@@ -10263,7 +10259,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root) ...@@ -10263,7 +10259,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root)
if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state))
return -EROFS; return -EROFS;
ret = __start_delalloc_inodes(root, 0, -1); ret = start_delalloc_inodes(root, -1);
if (ret > 0) if (ret > 0)
ret = 0; ret = 0;
return ret; return ret;
...@@ -10292,7 +10288,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr) ...@@ -10292,7 +10288,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr)
&fs_info->delalloc_roots); &fs_info->delalloc_roots);
spin_unlock(&fs_info->delalloc_root_lock); 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); btrfs_put_fs_root(root);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment