]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: pass struct btrfs_inode to btrfs_load_inode_props()
authorDavid Sterba <dsterba@suse.com>
Tue, 18 Feb 2025 00:16:46 +0000 (01:16 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:44 +0000 (20:35 +0100)
Pass a struct btrfs_inode to btrfs_load_inode_props() as it's an
internal interface, allowing to remove some use of BTRFS_I.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/props.c
fs/btrfs/props.h

index d6d5208c8a5e82028fe1e3b823cbef094a029a64..9a503be660e8eb1b70d92a05dacfad1edace4a53 100644 (file)
@@ -4017,7 +4017,7 @@ cache_acl:
                                           btrfs_ino(inode), &first_xattr_slot);
        if (first_xattr_slot != -1) {
                path->slots[0] = first_xattr_slot;
-               ret = btrfs_load_inode_props(vfs_inode, path);
+               ret = btrfs_load_inode_props(inode, path);
                if (ret)
                        btrfs_err(fs_info,
                                  "error loading props for ino %llu (root %llu): %d",
index b8fa34e16abbed9e4d1ae2574f32a63698a7a773..74d3217fc686b0f2d0d03bd9ccffc064050ffae2 100644 (file)
@@ -273,12 +273,13 @@ 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);
+       return iterate_object_props(root, path, ino, inode_prop_iterator,
+                                   &inode->vfs_inode);
 }
 
 static int prop_compression_validate(const struct btrfs_inode *inode,
index 86849d4e7938c387eb595647a66b7f730dcaf4a5..a0cc2a7a1e2e38cb4d97dd65bc4931a0e309d0c4 100644 (file)
@@ -23,7 +23,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,