summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorNikolay Borisov <n.borisov.lkml@gmail.com>2017-01-10 20:35:31 +0200
committerDavid Sterba <dsterba@suse.com>2017-02-14 15:50:51 +0100
commit4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8 (patch)
tree9ed2b2b2960e4b5dc8bed1f3a35ae9de95dcb12f /fs/btrfs/file-item.c
parent823bb20ab47071dc8a98acf272a470ccdcfcf6d1 (diff)
downloadtalos-obmc-linux-4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8.tar.gz
talos-obmc-linux-4a0cc7ca6c40b607b8aaa0bf6e97ffd74d64c2d8.zip
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/file-item.c')
-rw-r--r--fs/btrfs/file-item.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 42a97c910302..f7b9a92ad56d 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -255,7 +255,7 @@ static int __btrfs_lookup_bio_sums(struct inode *inode, struct bio *bio,
} else {
btrfs_info_rl(fs_info,
"no csum found for inode %llu start %llu",
- btrfs_ino(inode), offset);
+ btrfs_ino(BTRFS_I(inode)), offset);
}
item = NULL;
btrfs_release_path(path);
@@ -977,7 +977,7 @@ void btrfs_extent_item_to_extent_map(struct inode *inode,
} else {
btrfs_err(fs_info,
"unknown file extent item type %d, inode %llu, offset %llu, root %llu",
- type, btrfs_ino(inode), extent_start,
+ type, btrfs_ino(BTRFS_I(inode)), extent_start,
root->root_key.objectid);
}
}
OpenPOWER on IntegriCloud