diff mbox series

[10/11] btrfs: pass a btrfs_inode to btrfs_load_inode_props()

Message ID 2f83176d3fbdecdbe86df844b746d212422d4098.1719246104.git.dsterba@suse.com (mailing list archive)
State New
Headers show
Series Inode type conversion | expand

Commit Message

David Sterba June 24, 2024, 4:23 p.m. UTC
Pass a struct btrfs_inode to btrfs_load_inode_props() as it's an
internal interface, allowing to remove some use of BTRFS_I.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/inode.c | 2 +-
 fs/btrfs/props.c | 6 +++---
 fs/btrfs/props.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e9744392fe51..ed0275cee649 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3953,7 +3953,7 @@  static int btrfs_read_locked_inode(struct inode *inode,
 			btrfs_ino(BTRFS_I(inode)), &first_xattr_slot);
 	if (first_xattr_slot != -1) {
 		path->slots[0] = first_xattr_slot;
-		ret = btrfs_load_inode_props(inode, path);
+		ret = btrfs_load_inode_props(BTRFS_I(inode), path);
 		if (ret)
 			btrfs_err(fs_info,
 				  "error loading props for ino %llu (root %llu): %d",
diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c
index b8fa34e16abb..f6dba783d66b 100644
--- a/fs/btrfs/props.c
+++ b/fs/btrfs/props.c
@@ -273,10 +273,10 @@  static void inode_prop_iterator(void *ctx,
 		set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags);
 }
 
-int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
+int btrfs_load_inode_props(struct btrfs_inode *inode, struct btrfs_path *path)
 {
-	struct btrfs_root *root = BTRFS_I(inode)->root;
-	u64 ino = btrfs_ino(BTRFS_I(inode));
+	struct btrfs_root *root = inode->root;
+	u64 ino = btrfs_ino(inode);
 
 	return iterate_object_props(root, path, ino, inode_prop_iterator, inode);
 }
diff --git a/fs/btrfs/props.h b/fs/btrfs/props.h
index 63546d0a9444..4f401e890db8 100644
--- a/fs/btrfs/props.h
+++ b/fs/btrfs/props.h
@@ -22,7 +22,7 @@  int btrfs_validate_prop(const struct btrfs_inode *inode, const char *name,
 			const char *value, size_t value_len);
 bool btrfs_ignore_prop(const struct btrfs_inode *inode, const char *name);
 
-int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path);
+int btrfs_load_inode_props(struct btrfs_inode *inode, struct btrfs_path *path);
 
 int btrfs_inode_inherit_props(struct btrfs_trans_handle *trans,
 			      struct inode *inode,