btrfs: cleanup types storing REQ_*
authorDavid Sterba <dsterba@suse.com>
Tue, 6 Jun 2017 17:03:49 +0000 (19:03 +0200)
committerDavid Sterba <dsterba@suse.com>
Wed, 16 Aug 2017 14:12:04 +0000 (16:12 +0200)
Unify types of local variables and parameters that store various
REQ_* values to unsigned int.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/inode.c

index a7bebba4f9fcb23fa9713df260c8ef3dc5beee0b..339f39caa0b790d8e44a150da6613759c433c05e 100644 (file)
@@ -2756,7 +2756,8 @@ static int merge_bio(struct extent_io_tree *tree, struct page *page,
 
 }
 
-static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree,
+static int submit_extent_page(unsigned int op, unsigned int op_flags,
+                             struct extent_io_tree *tree,
                              struct writeback_control *wbc,
                              struct page *page, sector_t sector,
                              size_t size, unsigned long offset,
@@ -2877,7 +2878,7 @@ static int __do_readpage(struct extent_io_tree *tree,
                         get_extent_t *get_extent,
                         struct extent_map **em_cached,
                         struct bio **bio, int mirror_num,
-                        unsigned long *bio_flags, int read_flags,
+                        unsigned long *bio_flags, unsigned int read_flags,
                         u64 *prev_em_start)
 {
        struct inode *inode = page->mapping->host;
@@ -3163,7 +3164,8 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
                                   struct page *page,
                                   get_extent_t *get_extent,
                                   struct bio **bio, int mirror_num,
-                                  unsigned long *bio_flags, int read_flags)
+                                  unsigned long *bio_flags,
+                                  unsigned int read_flags)
 {
        struct inode *inode = page->mapping->host;
        struct btrfs_ordered_extent *ordered;
@@ -3310,7 +3312,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
                                 struct extent_page_data *epd,
                                 loff_t i_size,
                                 unsigned long nr_written,
-                                int write_flags, int *nr_ret)
+                                unsigned int write_flags, int *nr_ret)
 {
        struct extent_io_tree *tree = epd->tree;
        u64 start = page_offset(page);
@@ -3464,7 +3466,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
        size_t pg_offset = 0;
        loff_t i_size = i_size_read(inode);
        unsigned long end_index = i_size >> PAGE_SHIFT;
-       int write_flags = 0;
+       unsigned int write_flags = 0;
        unsigned long nr_written = 0;
 
        if (wbc->sync_mode == WB_SYNC_ALL)
@@ -3714,7 +3716,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
        unsigned long i, num_pages;
        unsigned long bio_flags = 0;
        unsigned long start, end;
-       int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META;
+       unsigned int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META;
        int ret = 0;
 
        clear_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags);
index 3926e9cbf0d919485a7242d43c20a78d891fba18..9349a13b3d725ae17fcb1809c176c15be2116d2f 100644 (file)
@@ -8019,7 +8019,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
        struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
        struct bio *bio;
        int isector;
-       int read_mode = 0;
+       unsigned int read_mode = 0;
        int segs;
        int ret;