Commit 82b3e53b authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove delayed_iput parameter of btrfs_start_delalloc_roots

This parameter was introduced alongside the function in
eb73c1b7 ("Btrfs: introduce per-subvolume delalloc inode list") to
avoid deadlocks since this function was used in the transaction commit
path. However, commit 8d875f95 ("btrfs: disable strict file flushes
for renames and truncates") removed that usage, rendering the parameter
obsolete.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0338dff6
...@@ -3205,8 +3205,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, ...@@ -3205,8 +3205,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
u32 min_type); u32 min_type);
int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput); int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput);
int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int delay_iput, int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr);
int nr);
int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end, int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
unsigned int extra_bits, unsigned int extra_bits,
struct extent_state **cached_state, int dedupe); struct extent_state **cached_state, int dedupe);
......
...@@ -594,7 +594,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info, ...@@ -594,7 +594,7 @@ static int btrfs_dev_replace_finishing(struct btrfs_fs_info *fs_info,
* flush all outstanding I/O and inode extent mappings before the * flush all outstanding I/O and inode extent mappings before the
* copy operation is declared as being finished * copy operation is declared as being finished
*/ */
ret = btrfs_start_delalloc_roots(fs_info, 0, -1); ret = btrfs_start_delalloc_roots(fs_info, -1);
if (ret) { if (ret) {
mutex_unlock(&dev_replace->lock_finishing_cancel_unmount); mutex_unlock(&dev_replace->lock_finishing_cancel_unmount);
return ret; return ret;
......
...@@ -4343,7 +4343,7 @@ int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes) ...@@ -4343,7 +4343,7 @@ int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes)
need_commit--; need_commit--;
if (need_commit > 0) { if (need_commit > 0) {
btrfs_start_delalloc_roots(fs_info, 0, -1); btrfs_start_delalloc_roots(fs_info, -1);
btrfs_wait_ordered_roots(fs_info, U64_MAX, 0, btrfs_wait_ordered_roots(fs_info, U64_MAX, 0,
(u64)-1); (u64)-1);
} }
...@@ -4796,7 +4796,7 @@ static void btrfs_writeback_inodes_sb_nr(struct btrfs_fs_info *fs_info, ...@@ -4796,7 +4796,7 @@ static void btrfs_writeback_inodes_sb_nr(struct btrfs_fs_info *fs_info,
* the filesystem is readonly(all dirty pages are written to * the filesystem is readonly(all dirty pages are written to
* the disk). * the disk).
*/ */
btrfs_start_delalloc_roots(fs_info, 0, nr_items); btrfs_start_delalloc_roots(fs_info, nr_items);
if (!current->journal_info) if (!current->journal_info)
btrfs_wait_ordered_roots(fs_info, nr_items, 0, (u64)-1); btrfs_wait_ordered_roots(fs_info, nr_items, 0, (u64)-1);
} }
......
...@@ -10269,8 +10269,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput) ...@@ -10269,8 +10269,7 @@ int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput)
return ret; return ret;
} }
int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int delay_iput, int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr)
int nr)
{ {
struct btrfs_root *root; struct btrfs_root *root;
struct list_head splice; struct list_head splice;
...@@ -10293,7 +10292,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int delay_iput, ...@@ -10293,7 +10292,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int delay_iput,
&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, delay_iput, nr); ret = __start_delalloc_inodes(root, 0, nr);
btrfs_put_fs_root(root); btrfs_put_fs_root(root);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
...@@ -5307,7 +5307,7 @@ long btrfs_ioctl(struct file *file, unsigned int ...@@ -5307,7 +5307,7 @@ long btrfs_ioctl(struct file *file, unsigned int
case BTRFS_IOC_SYNC: { case BTRFS_IOC_SYNC: {
int ret; int ret;
ret = btrfs_start_delalloc_roots(fs_info, 0, -1); ret = btrfs_start_delalloc_roots(fs_info, -1);
if (ret) if (ret)
return ret; return ret;
ret = btrfs_sync_fs(inode->i_sb, 1); ret = btrfs_sync_fs(inode->i_sb, 1);
......
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