]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: make btrfs_add_ordered_extent take btrfs_inode
authorNikolay Borisov <nborisov@suse.com>
Wed, 3 Jun 2020 05:55:13 +0000 (08:55 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:31 +0000 (12:55 +0200)
Preparation to converting its callers to taking btrfs_inode.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h

index 7a815f1d9e0d842c4fe892d8441312e52eb0b8fd..2d053c33c38093178ad37cb1165ae608e3e971cc 100644 (file)
@@ -1081,8 +1081,9 @@ static noinline int cow_file_range(struct inode *inode,
                }
                free_extent_map(em);
 
-               ret = btrfs_add_ordered_extent(inode, start, ins.objectid,
-                                              ram_size, cur_alloc_size, 0);
+               ret = btrfs_add_ordered_extent(BTRFS_I(inode), start,
+                                              ins.objectid, ram_size,
+                                              cur_alloc_size, 0);
                if (ret)
                        goto out_drop_extent_cache;
 
@@ -1716,7 +1717,7 @@ out_check:
                                goto error;
                        }
                        free_extent_map(em);
-                       ret = btrfs_add_ordered_extent(inode, cur_offset,
+                       ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset,
                                                       disk_bytenr, num_bytes,
                                                       num_bytes,
                                                       BTRFS_ORDERED_PREALLOC);
@@ -1728,7 +1729,7 @@ out_check:
                                goto error;
                        }
                } else {
-                       ret = btrfs_add_ordered_extent(inode, cur_offset,
+                       ret = btrfs_add_ordered_extent(BTRFS_I(inode), cur_offset,
                                                       disk_bytenr, num_bytes,
                                                       num_bytes,
                                                       BTRFS_ORDERED_NOCOW);
index 5f9ba8280560c184202626be639b7b341f40cd2b..156063373cc1b44710ef37ad25930501babb5e26 100644 (file)
@@ -252,11 +252,11 @@ static int __btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset
        return 0;
 }
 
-int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
+int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset,
                             u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes,
                             int type)
 {
-       return __btrfs_add_ordered_extent(BTRFS_I(inode), file_offset, disk_bytenr,
+       return __btrfs_add_ordered_extent(inode, file_offset, disk_bytenr,
                                          num_bytes, disk_num_bytes, type, 0,
                                          BTRFS_COMPRESS_NONE);
 }
index f2a78f8f6bcef75e105898f7b463158df5a7f2e1..6c42f307b87f6893d748de097956c05da8b0ee94 100644 (file)
@@ -151,7 +151,7 @@ int btrfs_dec_test_first_ordered_pending(struct inode *inode,
                                   struct btrfs_ordered_extent **cached,
                                   u64 *file_offset, u64 io_size,
                                   int uptodate);
-int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset,
+int btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset,
                             u64 disk_bytenr, u64 num_bytes, u64 disk_num_bytes,
                             int type);
 int btrfs_add_ordered_extent_dio(struct inode *inode, u64 file_offset,