[25/46] btrfs: Make btrfs_cleanup_ordered_extents take btrfs_inode
diff mbox series

Message ID 20200603055546.3889-26-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 btrfs_run_delalloc_range to using btrfs_inode
without BTRFS_I() calls.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 fs/btrfs/inode.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--
2.17.1

Patch
diff mbox series

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 964ebc0a8413..a8a41c19b0bb 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -103,7 +103,7 @@  static void __endio_write_update_ordered(struct btrfs_inode *inode,
  * to be released, which we want to happen only when finishing the ordered
  * extent (btrfs_finish_ordered_io()).
  */
-static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
+static inline void btrfs_cleanup_ordered_extents(struct btrfs_inode *inode,
 						 struct page *locked_page,
 						 u64 offset, u64 bytes)
 {
@@ -115,7 +115,7 @@  static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
 	struct page *page;

 	while (index <= end_index) {
-		page = find_get_page(inode->i_mapping, index);
+		page = find_get_page(inode->vfs_inode.i_mapping, index);
 		index++;
 		if (!page)
 			continue;
@@ -133,8 +133,7 @@  static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
 		bytes -= PAGE_SIZE;
 	}

-	return __endio_write_update_ordered(BTRFS_I(inode), offset, bytes,
-					    false);
+	return __endio_write_update_ordered(inode, offset, bytes, false);
 }

 static int btrfs_dirty_inode(struct inode *inode);
@@ -1820,7 +1819,7 @@  int btrfs_run_delalloc_range(struct inode *inode, struct page *locked_page,
 					   page_started, nr_written);
 	}
 	if (ret)
-		btrfs_cleanup_ordered_extents(inode, locked_page, start,
+		btrfs_cleanup_ordered_extents(BTRFS_I(inode), locked_page, start,
 					      end - start + 1);
 	return ret;
 }