mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 10:10:33 +02:00
btrfs: pass struct btrfs_inode to btrfs_load_inode_props()
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>
This commit is contained in:
parent
a0680a946f
commit
308a02a447
3 changed files with 7 additions and 6 deletions
|
|
@ -4017,7 +4017,7 @@ static int btrfs_read_locked_inode(struct btrfs_inode *inode, struct btrfs_path
|
||||||
btrfs_ino(inode), &first_xattr_slot);
|
btrfs_ino(inode), &first_xattr_slot);
|
||||||
if (first_xattr_slot != -1) {
|
if (first_xattr_slot != -1) {
|
||||||
path->slots[0] = first_xattr_slot;
|
path->slots[0] = first_xattr_slot;
|
||||||
ret = btrfs_load_inode_props(vfs_inode, path);
|
ret = btrfs_load_inode_props(inode, path);
|
||||||
if (ret)
|
if (ret)
|
||||||
btrfs_err(fs_info,
|
btrfs_err(fs_info,
|
||||||
"error loading props for ino %llu (root %llu): %d",
|
"error loading props for ino %llu (root %llu): %d",
|
||||||
|
|
|
||||||
|
|
@ -273,12 +273,13 @@ static void inode_prop_iterator(void *ctx,
|
||||||
set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags);
|
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;
|
struct btrfs_root *root = inode->root;
|
||||||
u64 ino = btrfs_ino(BTRFS_I(inode));
|
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,
|
static int prop_compression_validate(const struct btrfs_inode *inode,
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ int btrfs_validate_prop(const struct btrfs_inode *inode, const char *name,
|
||||||
const char *value, size_t value_len);
|
const char *value, size_t value_len);
|
||||||
bool btrfs_ignore_prop(const struct btrfs_inode *inode, const char *name);
|
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,
|
int btrfs_inode_inherit_props(struct btrfs_trans_handle *trans,
|
||||||
struct inode *inode,
|
struct inode *inode,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue