aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-16 16:20:31 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-16 16:20:31 -0400
commite089f05c18ab36ed5fa7e2319052e03ab800d518 (patch)
treef20d727233bb23fa5a37fc050cf0cc5c9d5e7b48 /fs/btrfs/dir-item.c
parent88fd146c27da0f34c512f47e2b3776a0762ecd81 (diff)
Btrfs: transaction handles everywhere
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r--fs/btrfs/dir-item.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index a42a67b9975..949c4e52679 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -5,9 +5,11 @@
#include "ctree.h"
#include "disk-io.h"
#include "hash.h"
+#include "transaction.h"
-int btrfs_insert_dir_item(struct btrfs_root *root, char *name, int name_len,
- u64 dir, u64 objectid, u8 type)
+int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
+ *root, char *name, int name_len, u64 dir, u64
+ objectid, u8 type)
{
int ret = 0;
struct btrfs_path path;
@@ -23,7 +25,7 @@ int btrfs_insert_dir_item(struct btrfs_root *root, char *name, int name_len,
BUG_ON(ret);
btrfs_init_path(&path);
data_size = sizeof(*dir_item) + name_len;
- ret = btrfs_insert_empty_item(root, &path, &key, data_size);
+ ret = btrfs_insert_empty_item(trans, root, &path, &key, data_size);
if (ret)
goto out;
@@ -40,8 +42,9 @@ out:
return ret;
}
-int btrfs_lookup_dir_item(struct btrfs_root *root, struct btrfs_path *path,
- u64 dir, char *name, int name_len, int mod)
+int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
+ *root, struct btrfs_path *path, u64 dir, char *name,
+ int name_len, int mod)
{
int ret;
struct btrfs_key key;
@@ -53,12 +56,13 @@ int btrfs_lookup_dir_item(struct btrfs_root *root, struct btrfs_path *path,
btrfs_set_key_type(&key, BTRFS_DIR_ITEM_KEY);
ret = btrfs_name_hash(name, name_len, &key.offset);
BUG_ON(ret);
- ret = btrfs_search_slot(root, &key, path, ins_len, cow);
+ ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow);
return ret;
}
-int btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path,
- char *name, int name_len)
+int btrfs_match_dir_item_name(struct btrfs_root *root,
+ struct btrfs_path *path, char
+ *name, int name_len)
{
struct btrfs_dir_item *dir_item;
char *name_ptr;