提交 25c1252a 编写于 作者: D David Sterba

btrfs: switch uptodate to bool in btrfs_writepage_endio_finish_ordered

The uptodate parameter should be bool, change the type.
Reviewed-by: NQu Wenruo <wqu@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 a129ffb8
...@@ -3195,7 +3195,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page ...@@ -3195,7 +3195,7 @@ int btrfs_run_delalloc_range(struct btrfs_inode *inode, struct page *locked_page
int btrfs_writepage_cow_fixup(struct page *page); int btrfs_writepage_cow_fixup(struct page *page);
void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode, void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
struct page *page, u64 start, struct page *page, u64 start,
u64 end, int uptodate); u64 end, bool uptodate);
extern const struct dentry_operations btrfs_dentry_operations; extern const struct dentry_operations btrfs_dentry_operations;
extern const struct iomap_ops btrfs_dio_iomap_ops; extern const struct iomap_ops btrfs_dio_iomap_ops;
extern const struct iomap_dio_ops btrfs_dio_ops; extern const struct iomap_dio_ops btrfs_dio_ops;
......
...@@ -2779,7 +2779,7 @@ static blk_status_t submit_read_repair(struct inode *inode, ...@@ -2779,7 +2779,7 @@ static blk_status_t submit_read_repair(struct inode *inode,
void end_extent_writepage(struct page *page, int err, u64 start, u64 end) void end_extent_writepage(struct page *page, int err, u64 start, u64 end)
{ {
struct btrfs_inode *inode; struct btrfs_inode *inode;
int uptodate = (err == 0); const bool uptodate = (err == 0);
int ret = 0; int ret = 0;
ASSERT(page && page->mapping); ASSERT(page && page->mapping);
...@@ -3863,7 +3863,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, ...@@ -3863,7 +3863,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
if (cur >= i_size) { if (cur >= i_size) {
btrfs_writepage_endio_finish_ordered(inode, page, cur, btrfs_writepage_endio_finish_ordered(inode, page, cur,
end, 1); end, true);
break; break;
} }
...@@ -3913,7 +3913,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode, ...@@ -3913,7 +3913,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
nr++; nr++;
else else
btrfs_writepage_endio_finish_ordered(inode, btrfs_writepage_endio_finish_ordered(inode,
page, cur, cur + iosize - 1, 1); page, cur, cur + iosize - 1, true);
cur += iosize; cur += iosize;
continue; continue;
} }
...@@ -4982,7 +4982,7 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end, ...@@ -4982,7 +4982,7 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
ret = __extent_writepage(page, &wbc_writepages, &epd); ret = __extent_writepage(page, &wbc_writepages, &epd);
else { else {
btrfs_writepage_endio_finish_ordered(BTRFS_I(inode), btrfs_writepage_endio_finish_ordered(BTRFS_I(inode),
page, start, start + PAGE_SIZE - 1, 1); page, start, start + PAGE_SIZE - 1, true);
unlock_page(page); unlock_page(page);
} }
put_page(page); put_page(page);
......
...@@ -972,7 +972,7 @@ static noinline void submit_compressed_extents(struct async_chunk *async_chunk) ...@@ -972,7 +972,7 @@ static noinline void submit_compressed_extents(struct async_chunk *async_chunk)
p->mapping = inode->vfs_inode.i_mapping; p->mapping = inode->vfs_inode.i_mapping;
btrfs_writepage_endio_finish_ordered(inode, p, start, btrfs_writepage_endio_finish_ordered(inode, p, start,
end, 0); end, false);
p->mapping = NULL; p->mapping = NULL;
extent_clear_unlock_delalloc(inode, start, end, NULL, 0, extent_clear_unlock_delalloc(inode, start, end, NULL, 0,
...@@ -3170,7 +3170,7 @@ static void finish_ordered_fn(struct btrfs_work *work) ...@@ -3170,7 +3170,7 @@ static void finish_ordered_fn(struct btrfs_work *work)
void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode, void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
struct page *page, u64 start, struct page *page, u64 start,
u64 end, int uptodate) u64 end, bool uptodate)
{ {
trace_btrfs_writepage_end_io_hook(inode, start, end, uptodate); trace_btrfs_writepage_end_io_hook(inode, start, end, uptodate);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册