diff options
author | Nikolay Borisov <n.borisov.lkml@gmail.com> | 2017-01-10 21:35:31 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-14 17:50:51 +0300 |
commit | 4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8 (patch) | |
tree | 9ed2b2b2960e4b5dc8bed1f3a35ae9de95dcb12f /fs/btrfs/dir-item.c | |
parent | 823bb20ab47071dc8a98acf272a470ccdcfcf6d1 (diff) | |
download | linux-4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8.tar.xz |
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/dir-item.c')
-rw-r--r-- | fs/btrfs/dir-item.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index b039fe0c751a..74de492bd490 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c @@ -133,7 +133,7 @@ int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root struct btrfs_disk_key disk_key; u32 data_size; - key.objectid = btrfs_ino(dir); + key.objectid = btrfs_ino(BTRFS_I(dir)); key.type = BTRFS_DIR_ITEM_KEY; key.offset = btrfs_name_hash(name, name_len); |