diff options
author | Christoph Hellwig <hch@lst.de> | 2009-10-01 12:58:30 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-10-01 12:58:30 -0400 |
commit | 8aa38c31b7659e338fee4d9af4c3805acbd9806f (patch) | |
tree | 44d20f44a432ba05cfcfcd093428e777e4d3fd9e /fs/btrfs/file.c | |
parent | 25472b880c69c0daa485c4f80a6550437ed1149f (diff) |
Btrfs: remove duplicates of filemap_ helpers
Use filemap_fdatawrite_range and filemap_fdatawait_range instead of
local copies of the functions. For filemap_fdatawait_range that
also means replacing the awkward old wait_on_page_writeback_range
calling convention with the regular filemap byte offsets.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 7351bdbca26f..ca784a7fbeba 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -1022,9 +1022,8 @@ static ssize_t btrfs_file_write(struct file *file, const char __user *buf, | |||
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | if (will_write) { | 1024 | if (will_write) { |
1025 | btrfs_fdatawrite_range(inode->i_mapping, pos, | 1025 | filemap_fdatawrite_range(inode->i_mapping, pos, |
1026 | pos + write_bytes - 1, | 1026 | pos + write_bytes - 1); |
1027 | WB_SYNC_ALL); | ||
1028 | } else { | 1027 | } else { |
1029 | balance_dirty_pages_ratelimited_nr(inode->i_mapping, | 1028 | balance_dirty_pages_ratelimited_nr(inode->i_mapping, |
1030 | num_pages); | 1029 | num_pages); |