1 #include <linux/module.h>
4 #include "transaction.h"
6 int btrfs_insert_inode(struct btrfs_trans_handle *trans, struct btrfs_root
7 *root, u64 objectid, struct btrfs_inode_item
10 struct btrfs_path path;
13 key.objectid = objectid;
15 btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY);
18 btrfs_init_path(&path);
19 ret = btrfs_insert_item(trans, root, &key, inode_item,
21 btrfs_release_path(root, &path);
25 int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root
26 *root, struct btrfs_path *path, u64 objectid, int mod)
29 int ins_len = mod < 0 ? -1 : 0;
32 key.objectid = objectid;
34 btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY);
36 return btrfs_search_slot(trans, root, &key, path, ins_len, cow);