Message ID | 1536703587-94565-3-git-send-email-bo.liu@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Btrfs: remove wait_ordered_range in btrfs_evict_inode | expand |
On Wed, Sep 12, 2018 at 06:06:22AM +0800, Liu Bo wrote: > As VFS has called ->invalidatepage() to get all ordered extents done > and truncated all page cache pages, wait_ordered_range() is just a > noop. Agreed, though looking up the exact points when there are no pages to be waited for took me some time. More references and hints in the changelog would be good. I'll add the patch to misc-next so it can be tested, but please send me an update if you have idea how to rephrase the changelog. Thanks. Reviewed-by: David Sterba <dsterba@suse.com>
On Fri, Sep 14, 2018 at 03:14:33PM +0200, David Sterba wrote: > On Wed, Sep 12, 2018 at 06:06:22AM +0800, Liu Bo wrote: > > As VFS has called ->invalidatepage() to get all ordered extents done > > and truncated all page cache pages, wait_ordered_range() is just a > > noop. > > Agreed, though looking up the exact points when there are no pages to be > waited for took me some time. More references and hints in the changelog > would be good. I'll add the patch to misc-next so it can be tested, but > please send me an update if you have idea how to rephrase the changelog. > Thanks. > > Reviewed-by: David Sterba <dsterba@suse.com> OK, I'll add some call stack, hopefully can make it better. thanks, -liubo
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ff1d2ed2dc94..d3febc3a6bc0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5390,9 +5390,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);
As VFS has called ->invalidatepage() to get all ordered extents done and truncated all page cache pages, wait_ordered_range() is just a noop. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com> --- fs/btrfs/inode.c | 3 --- 1 file changed, 3 deletions(-)