diff options
author | Nikolay Borisov | 2017-01-10 20:35:31 +0200 |
---|---|---|
committer | David Sterba | 2017-02-14 15:50:51 +0100 |
commit | 4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8 (patch) | |
tree | 9ed2b2b2960e4b5dc8bed1f3a35ae9de95dcb12f /fs/btrfs/transaction.c | |
parent | 823bb20ab47071dc8a98acf272a470ccdcfcf6d1 (diff) |
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>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index bd2890c2c9d3..90e73f65dccf 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1504,7 +1504,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, /* check if there is a file/dir which has the same name. */ dir_item = btrfs_lookup_dir_item(NULL, parent_root, path, - btrfs_ino(parent_inode), + btrfs_ino(BTRFS_I(parent_inode)), dentry->d_name.name, dentry->d_name.len, 0); if (dir_item != NULL && !IS_ERR(dir_item)) { @@ -1598,7 +1598,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans, */ ret = btrfs_add_root_ref(trans, fs_info, objectid, parent_root->root_key.objectid, - btrfs_ino(parent_inode), index, + btrfs_ino(BTRFS_I(parent_inode)), index, dentry->d_name.name, dentry->d_name.len); if (ret) { btrfs_abort_transaction(trans, ret); |