]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: switch uptodate to bool in btrfs_writepage_endio_finish_ordered
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Jul 2021 12:15:08 +0000 (14:15 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:02 +0000 (13:19 +0200)
The uptodate parameter should be bool, change the type.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent_io.c
fs/btrfs/inode.c

index f265fb4f417fe35b9d6a4d97ea63abdbbf404988..194002f4e611e1766648410533edeec5ae01a868 100644 (file)
@@ -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);
 void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
                                          struct page *page, u64 start,
-                                         u64 end, int uptodate);
+                                         u64 end, bool uptodate);
 extern const struct dentry_operations btrfs_dentry_operations;
 extern const struct iomap_ops btrfs_dio_iomap_ops;
 extern const struct iomap_dio_ops btrfs_dio_ops;
index 05637ef22b9e8c2ef74e030b61dc3af69e1e3298..19ba5b03b2df6744bf5d747c9eaf761c1479254f 100644 (file)
@@ -2779,7 +2779,7 @@ next:
 void end_extent_writepage(struct page *page, int err, u64 start, u64 end)
 {
        struct btrfs_inode *inode;
-       int uptodate = (err == 0);
+       const bool uptodate = (err == 0);
        int ret = 0;
 
        ASSERT(page && page->mapping);
@@ -3863,7 +3863,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
 
                if (cur >= i_size) {
                        btrfs_writepage_endio_finish_ordered(inode, page, cur,
-                                                            end, 1);
+                                                            end, true);
                        break;
                }
 
@@ -3913,7 +3913,7 @@ static noinline_for_stack int __extent_writepage_io(struct btrfs_inode *inode,
                                nr++;
                        else
                                btrfs_writepage_endio_finish_ordered(inode,
-                                               page, cur, cur + iosize - 1, 1);
+                                               page, cur, cur + iosize - 1, true);
                        cur += iosize;
                        continue;
                }
@@ -4982,7 +4982,7 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end,
                        ret = __extent_writepage(page, &wbc_writepages, &epd);
                else {
                        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);
                }
                put_page(page);
index 30f2dc421ceff48292526cea64f6bb96d67c9644..d41aa8e5d0cc0f734013217dbb3ef13641486aa0 100644 (file)
@@ -972,7 +972,7 @@ retry:
 
                        p->mapping = inode->vfs_inode.i_mapping;
                        btrfs_writepage_endio_finish_ordered(inode, p, start,
-                                                            end, 0);
+                                                            end, false);
 
                        p->mapping = NULL;
                        extent_clear_unlock_delalloc(inode, start, end, NULL, 0,
@@ -3170,7 +3170,7 @@ static void finish_ordered_fn(struct btrfs_work *work)
 
 void btrfs_writepage_endio_finish_ordered(struct btrfs_inode *inode,
                                          struct page *page, u64 start,
-                                         u64 end, int uptodate)
+                                         u64 end, bool uptodate)
 {
        trace_btrfs_writepage_end_io_hook(inode, start, end, uptodate);