[13/46] btrfs: Make btrfs_add_ordered_extent take btrfs_inode
diff mbox series

Message ID 20200603055546.3889-14-nborisov@suse.com
State New
Headers show
Series
  • Trivial BTRFS_I removal
Related show

Commit Message

Nikolay Borisov June 3, 2020, 5:55 a.m. UTC
Preparation to converting its callers to taking btrfs_inode.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/inode.c        | 9 +++++----
 fs/btrfs/ordered-data.c | 4 ++--
 fs/btrfs/ordered-data.h | 2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

--
2.17.1

Patch
diff mbox series

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a05ffc129967..b04e27306058 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1063,8 +1063,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;

@@ -1698,7 +1699,7 @@  static noinline int run_delalloc_nocow(struct inode *inode,
 				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);
@@ -1710,7 +1711,7 @@  static noinline int run_delalloc_nocow(struct inode *inode,
 				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);
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 4139de966c74..146fdf16010e 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -234,11 +234,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);
 }
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index 6afa9d98e84e..ae6c4eaf975b 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -154,7 +154,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,