summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-06-23 04:16:17 +0200
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:18 +0100
commite2932ee08e46629b0d39eda920e1d795e6d83946 (patch)
tree02ed77e0f1fa58e328629941cfd2a530fdd4c77f /fs
parenta74b35ec876df1c2d11b980bb5e4f697ea4fba94 (diff)
downloadop-kernel-dev-e2932ee08e46629b0d39eda920e1d795e6d83946.zip
op-kernel-dev-e2932ee08e46629b0d39eda920e1d795e6d83946.tar.gz
btrfs: merge two flush_write_bio helpers
flush_epd_write_bio is same as flush_write_bio, no point having two such functions. Merge them to flush_write_bio. The 'noinline' attribute is removed as it does not have any meaning. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 6cd3da1..f1842d5 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -138,7 +138,8 @@ static void add_extent_changeset(struct extent_state *state, unsigned bits,
BUG_ON(ret < 0);
}
-static noinline void flush_write_bio(void *data);
+static void flush_write_bio(void *data);
+
static inline struct btrfs_fs_info *
tree_fs_info(struct extent_io_tree *tree)
{
@@ -4039,8 +4040,10 @@ retry:
return ret;
}
-static void flush_epd_write_bio(struct extent_page_data *epd)
+static void flush_write_bio(void *data)
{
+ struct extent_page_data *epd = data;
+
if (epd->bio) {
int ret;
@@ -4050,12 +4053,6 @@ static void flush_epd_write_bio(struct extent_page_data *epd)
}
}
-static noinline void flush_write_bio(void *data)
-{
- struct extent_page_data *epd = data;
- flush_epd_write_bio(epd);
-}
-
int extent_write_full_page(struct page *page, struct writeback_control *wbc)
{
int ret;
@@ -4068,7 +4065,7 @@ int extent_write_full_page(struct page *page, struct writeback_control *wbc)
ret = __extent_writepage(page, wbc, &epd);
- flush_epd_write_bio(&epd);
+ flush_write_bio(&epd);
return ret;
}
@@ -4110,7 +4107,7 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
start += PAGE_SIZE;
}
- flush_epd_write_bio(&epd);
+ flush_write_bio(&epd);
return ret;
}
@@ -4128,7 +4125,7 @@ int extent_writepages(struct extent_io_tree *tree,
ret = extent_write_cache_pages(mapping, wbc, __extent_writepage, &epd,
flush_write_bio);
- flush_epd_write_bio(&epd);
+ flush_write_bio(&epd);
return ret;
}
OpenPOWER on IntegriCloud