mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
btrfs: Make btrfs_ino take a struct btrfs_inode
Currently btrfs_ino takes a struct inode and this causes a lot of internal btrfs functions which consume this ino to take a VFS inode, rather than btrfs' own struct btrfs_inode. In order to fix this "leak" of VFS structs into the internals of btrfs first it's necessary to eliminate all uses of struct inode for the purpose of inode. This patch does that by using BTRFS_I to convert an inode to btrfs_inode. With this problem eliminated subsequent patches will start eliminating the passing of struct inode altogether, eventually resulting in a lot cleaner code. Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com> [ fix btrfs_get_extent tracepoint prototype ] Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
823bb20ab4
commit
4a0cc7ca6c
18 changed files with 151 additions and 151 deletions
|
@ -279,7 +279,7 @@ static void inode_prop_iterator(void *ctx,
|
|||
if (unlikely(ret))
|
||||
btrfs_warn(root->fs_info,
|
||||
"error applying prop %s to ino %llu (root %llu): %d",
|
||||
handler->xattr_name, btrfs_ino(inode),
|
||||
handler->xattr_name, btrfs_ino(BTRFS_I(inode)),
|
||||
root->root_key.objectid, ret);
|
||||
else
|
||||
set_bit(BTRFS_INODE_HAS_PROPS, &BTRFS_I(inode)->runtime_flags);
|
||||
|
@ -288,7 +288,7 @@ static void inode_prop_iterator(void *ctx,
|
|||
int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
|
||||
{
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
u64 ino = btrfs_ino(inode);
|
||||
u64 ino = btrfs_ino(BTRFS_I(inode));
|
||||
int ret;
|
||||
|
||||
ret = iterate_object_props(root, path, ino, inode_prop_iterator, inode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue