diff options
author | Filipe Manana <fdmanana@suse.com> | 2014-10-10 08:43:11 (GMT) |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-11-21 01:14:28 (GMT) |
commit | 728404dacfddb5364d7256d821a2ea482159cbe7 (patch) | |
tree | adb45931cbe6104ad888f4cc2d43aa0951f8b8d0 /fs/btrfs/inode.c | |
parent | 075bdbdbe9f21d68950ba5b187f80a4a23105365 (diff) | |
download | linux-728404dacfddb5364d7256d821a2ea482159cbe7.tar.xz |
Btrfs: add helper btrfs_fdatawrite_range
To avoid duplicating this double filemap_fdatawrite_range() call for
inodes with async extents (compressed writes) so often.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 01d223e..95f0693 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -7015,14 +7015,7 @@ static int lock_extent_direct(struct inode *inode, u64 lockstart, u64 lockend, btrfs_put_ordered_extent(ordered); } else { /* Screw you mmap */ - ret = filemap_fdatawrite_range(inode->i_mapping, - lockstart, - lockend); - if (!ret && test_bit(BTRFS_INODE_HAS_ASYNC_EXTENT, - &BTRFS_I(inode)->runtime_flags)) - ret = filemap_fdatawrite_range(inode->i_mapping, - lockstart, - lockend); + ret = btrfs_fdatawrite_range(inode, lockstart, lockend); if (ret) break; ret = filemap_fdatawait_range(inode->i_mapping, |