diff options
author | Liu Bo <bo.liu@linux.alibaba.com> | 2018-09-12 06:06:22 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-10-15 17:23:31 +0200 |
commit | 4183c52ce8871544ea94054ee47c685ecae714f6 (patch) | |
tree | eaf4b9b6dbe4d2400fe5dd8329ae9d3f2d88ea30 /fs/btrfs | |
parent | abb57ef3ff9720c42bbc06bcd1788da9ce1a3eb8 (diff) | |
download | blackbird-obmc-linux-4183c52ce8871544ea94054ee47c685ecae714f6.tar.gz blackbird-obmc-linux-4183c52ce8871544ea94054ee47c685ecae714f6.zip |
Btrfs: remove wait_ordered_range in btrfs_evict_inode
When we delete an inode,
btrfs_evict_inode() {
truncate_inode_pages_final()
truncate_inode_pages_range()
lock_page()
truncate_cleanup_page()
btrfs_invalidatepage()
wait_on_page_writeback
btrfs_lookup_ordered_range()
cancel_dirty_page()
unlock_page()
...
btrfs_wait_ordered_range()
...
As VFS has called ->invalidatepage() to get all ordered extents done (if
there are any) and truncated all page cache pages (no dirty pages to
writeback after this step), wait_ordered_range() is just a noop.
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f2c38f5ff6e2..e80304e4f16a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5362,9 +5362,6 @@ void btrfs_evict_inode(struct inode *inode) if (is_bad_inode(inode)) goto no_delete; - /* do we really want it for ->i_nlink > 0 and zero btrfs_root_refs? */ - if (!special_file(inode->i_mode)) - btrfs_wait_ordered_range(inode, 0, (u64)-1); btrfs_free_io_failure_record(BTRFS_I(inode), 0, (u64)-1); |