/* simple helper to read an inode off the disk from a given root This can only be called for subvolume roots and not for the log  */
static noinline struct inode* read_one_inode(struct btrfs_root *root, u64 objectid)
/* simple helper to read an inode off the disk from a given root This can only be called for subvolume roots and not for the log  */
static noinline struct inode* read_one_inode(struct btrfs_root *root, u64 objectid)
{
	struct btrfs_key key;
	struct inode *inode;
	key.objectid = objectid;
	key.type = BTRFS_INODE_ITEM_KEY;
	key.offset = 0;
	inode = btrfs_iget(root->fs_info->sb, &key, root);
	if (IS_ERR(inode)) {
		inode = NULL;
	} else if (is_bad_inode(inode)) {
		iput(inode);
		inode = NULL;
	}
	return inode;
}